remove admin only flags for sections and locale

This commit is contained in:
j 2014-03-05 13:39:25 +00:00
parent 1fb1fd9d89
commit 550ced514d
6 changed files with 6 additions and 8 deletions

View file

@ -32,7 +32,6 @@ pandora.ui.appearanceDialog = function() {
} }
}), }),
Ox.Select({ Ox.Select({
disabled: pandora.user.level != 'admin',
id: 'locale', id: 'locale',
items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) { items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) {
return {id: locale, title: Ox.LOCALE_NAMES[locale]} return {id: locale, title: Ox.LOCALE_NAMES[locale]}

View file

@ -232,6 +232,7 @@ pandora.ui.folders = function(section) {
})]; })];
} }
} else if (folder.id == 'featured') { } else if (folder.id == 'featured') {
//FIXME: this should use 'canEditFeatured' + section
if (pandora.user.level != 'admin') { if (pandora.user.level != 'admin') {
extras = [infoButton(Ox._('Featured ' + folderItems), extras = [infoButton(Ox._('Featured ' + folderItems),
Ox._('Featured {0} are selected public {0}, picked by the {1} staff.', Ox._('Featured {0} are selected public {0}, picked by the {1} staff.',

View file

@ -56,8 +56,7 @@ pandora.ui.mainMenu = function() {
return { return {
id: section, id: section,
title: section == 'items' ? Ox._(pandora.site.itemName.plural) : Ox._(Ox.toTitleCase(section)), title: section == 'items' ? Ox._(pandora.site.itemName.plural) : Ox._(Ox.toTitleCase(section)),
checked: ui.section == section, checked: ui.section == section
disabled: section != 'items' && pandora.user.level != 'admin'
}; };
}) } }) }
] }, ] },

View file

@ -120,7 +120,6 @@ pandora.ui.preferencesDialog = function() {
} }
}), }),
Ox.Select({ Ox.Select({
disabled: pandora.user.level != 'admin',
id: 'locale', id: 'locale',
items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) { items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) {
return {id: locale, title: Ox.LOCALE_NAMES[locale]} return {id: locale, title: Ox.LOCALE_NAMES[locale]}

View file

@ -4,8 +4,8 @@ pandora.ui.sectionButtons = function(section) {
var that = Ox.ButtonGroup({ var that = Ox.ButtonGroup({
buttons: [ buttons: [
{id: 'items', title: Ox._(pandora.site.itemName.plural)}, {id: 'items', title: Ox._(pandora.site.itemName.plural)},
{id: 'edits', title: Ox._('Edits'), disabled: pandora.user.level != 'admin'}, {id: 'edits', title: Ox._('Edits')},
{id: 'texts', title: Ox._('Texts'), disabled: pandora.user.level != 'admin'} {id: 'texts', title: Ox._('Texts')}
], ],
id: 'sectionButtons', id: 'sectionButtons',
selectable: true, selectable: true,

View file

@ -6,8 +6,8 @@ pandora.ui.sectionSelect = function(section) {
id: 'sectionSelect', id: 'sectionSelect',
items: [ items: [
{id: 'items', title: Ox._(pandora.site.itemName.plural)}, {id: 'items', title: Ox._(pandora.site.itemName.plural)},
{id: 'edits', title: Ox._('Edits'), disabled: pandora.user.level != 'admin'}, {id: 'edits', title: Ox._('Edits')},
{id: 'texts', title: Ox._('Texts'), disabled: pandora.user.level != 'admin'} {id: 'texts', title: Ox._('Texts')}
], ],
value: section || pandora.user.ui.section value: section || pandora.user.ui.section
}).css({ }).css({