From ad01da8f3638ff7e6abd5f5665d7ae1732fe2aec Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 1 Jul 2012 12:24:57 +0000 Subject: [PATCH] update version text in software panel of site dialog, add a capability --- pandora/config.0xdb.jsonc | 1 + pandora/config.padma.jsonc | 1 + pandora/config.pandora.jsonc | 1 + static/js/pandora/siteDialog.0xdb.js | 11 +++++++++-- static/js/pandora/siteDialog.js | 11 +++++++++-- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index 033ce528e..6f1c38200 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -47,6 +47,7 @@ "canSeeFiles": {"staff": true, "admin": true}, "canSeeItem": {"guest": 3, "member": 3, "friend": 4, "staff": 4, "admin": 4}, "canSeeSize": {"friend": true, "staff": true, "admin": true}, + "canSeeSoftwareVersion": {"staff": true, "admin": true}, "canSendMail": {"staff": true, "admin": true}, "canUploadVideo": {"guest": false, "member": false, "staff": true, "admin": true} }, diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc index 7b853e450..87f740619 100644 --- a/pandora/config.padma.jsonc +++ b/pandora/config.padma.jsonc @@ -45,6 +45,7 @@ "canSeeFiles": {"staff": true, "admin": true}, "canSeeItem": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, "canSeeSize": {"staff": true, "admin": true}, + "canSeeSoftwareVersion": {"staff": true, "admin": true}, "canSendMail": {"staff": true, "admin": true}, "canUploadVideo": {"guest": false, "member": true, "staff": true, "admin": true} }, diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index ba986ab52..0ce6c2173 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -45,6 +45,7 @@ "canSeeFiles": {"staff": true, "admin": true}, "canSeeItem": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, "canSeeSize": {"staff": true, "admin": true}, + "canSeeSoftwareVersion": {"staff": true, "admin": true}, "canSendMail": {"staff": true, "admin": true}, "canUploadVideo": {"guest": false, "member": true, "staff": true, "admin": true} }, diff --git a/static/js/pandora/siteDialog.0xdb.js b/static/js/pandora/siteDialog.0xdb.js index 86d1005e5..6c8f3ed17 100644 --- a/static/js/pandora/siteDialog.0xdb.js +++ b/static/js/pandora/siteDialog.0xdb.js @@ -4,7 +4,8 @@ pandora.ui.siteDialog = function(section) { - var dialogHeight = Math.round((window.innerHeight - 48) * 0.75), + var canSeeVersion = pandora.site.capabilities.canSeeSoftwareVersion[pandora.user.level], + dialogHeight = Math.round((window.innerHeight - 48) * 0.75), dialogWidth = Math.round(window.innerWidth * 0.75), isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level], tabs = Ox.clone(pandora.site.sitePages, true).concat([{id: 'software', title: 'Software'}]); @@ -28,7 +29,13 @@ pandora.ui.siteDialog = function(section) { + '

To learn more about pan.do/ra and OxJS, ' + 'please visit pan.do/ra ' + 'and oxjs.org.

' - + '' + pandora.site.site.name + ' is running pan.do/ra r'+ pandora.site.site.version + + ( + canSeeVersion + ? '' + pandora.site.site.name + + ' is running pan.do/ra revision ' + + pandora.site.site.version + '.' + : '' + ) ) .appendTo($content); } else { diff --git a/static/js/pandora/siteDialog.js b/static/js/pandora/siteDialog.js index bb5a9cd54..6f34f0438 100644 --- a/static/js/pandora/siteDialog.js +++ b/static/js/pandora/siteDialog.js @@ -4,7 +4,8 @@ pandora.ui.siteDialog = function(section) { - var dialogHeight = Math.round((window.innerHeight - 48) * 0.75), + var canSeeVersion = pandora.site.capabilities.canSeeSoftwareVersion[pandora.user.level], + dialogHeight = Math.round((window.innerHeight - 48) * 0.75), dialogWidth = Math.round(window.innerWidth * 0.75), isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level], tabs = Ox.clone(pandora.site.sitePages, true).concat([{id: 'software', title: 'Software'}]); @@ -28,7 +29,13 @@ pandora.ui.siteDialog = function(section) { + '

To learn more about pan.do/ra and OxJS, ' + 'please visit pan.do/ra ' + 'and oxjs.org.

' - + '' + pandora.site.site.name + ' is running pan.do/ra r'+ pandora.site.site.version + + ( + canSeeVersion + ? '' + pandora.site.site.name + + ' is running pan.do/ra revision ' + + pandora.site.site.version + '.' + : '' + ) ) .appendTo($content); } else {