Skip to content

Commit

Permalink
add button to publish all languages
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Nov 22, 2024
1 parent d0c1d52 commit e6c14f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions admin/app/scripts/controllers/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,12 @@ angular.module('bmmApp')
});
};

$scope.publishAllLanguages = function() {
$.each($scope.model.translations, function() {
this.is_visible = true;
});
}

$scope.switchLanguage = function(newLang, oldLang) {
if (typeof oldLang!=='undefined') {
$.each($scope.model.translations, function(index) {
Expand Down
4 changes: 3 additions & 1 deletion admin/app/views/pages/track.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ <h3>{{init.translation.page.editor.languages}}</h3>
</div>
<div class="body" ng-class="{'visible': language}">
<ul style="width: 50%; float: left">
<h4>{{init.translation.page.editor.active}}</h4>
<h4>{{init.translation.page.editor.active}}
<button ng-click="publishAllLanguages()" style="font-size: 13px; margin-left: 10px;">Publish all</button>
</h4>
<li ng-repeat="language in model.translations"
ng-class="{'original': language.language==model.original_language,
'unpublished': !language.is_visible}"
Expand Down

0 comments on commit e6c14f0

Please sign in to comment.