diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-17 17:05:39 +0400 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-24 16:58:29 +0400 |
commit | a5a2fe91809537a585dc0b631fea1b235f544642 (patch) | |
tree | 383949b66908b5bb88cf76cf0bb07974dd34eecd /settings | |
parent | 29d63893ffbe58fc224602594302342697438831 (diff) |
show link to app documentation
Diffstat (limited to 'settings')
-rw-r--r-- | settings/css/settings.css | 6 | ||||
-rw-r--r-- | settings/js/apps.js | 20 | ||||
-rw-r--r-- | settings/templates/apps.php | 5 |
3 files changed, 30 insertions, 1 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index 2e464c3f110..177e26bb33f 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -131,6 +131,12 @@ span.version { margin-left:1em; margin-right:1em; color:#555; } .appslink { text-decoration: underline; } .score { color:#666; font-weight:bold; font-size:0.8em; } +.appinfo .documentation { + margin-top: 1em; + margin-bottom: 1em; +} + + /* LOG */ #log { white-space:normal; } #lessLog { display:none; } diff --git a/settings/js/apps.js b/settings/js/apps.js index a55c55e24cf..1d05d01e1f2 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -37,6 +37,24 @@ OC.Settings.Apps = OC.Settings.Apps || { } page.find('span.licence').text(appLicense); + var userDocumentation = false; + var adminDocumentation = false; + if (typeof(app.documentation.user) !== 'undefined') { + userDocumentation = true; + page.find('span.userDocumentation').html("<a href='" + app.documentation.user + "'>" + t('settings', 'User Documentation') + "</a>"); + page.find('p.documentation').show(); + } + if (typeof(app.documentation.admin) !== 'undefined') { + adminDocumentation = true; + page.find('span.adminDocumentation').html("<a href='" + app.documentation.admin + "'>" + t('settings', 'Admin Documentation') + "</a>"); + page.find('p.documentation').show(); + } + + if(userDocumentation && adminDocumentation) { + page.find('span.userDocumentation').after(', '); + } + + if (app.update !== false) { page.find('input.update').show(); page.find('input.update').data('appid', app.id); @@ -110,7 +128,7 @@ OC.Settings.Apps = OC.Settings.Apps || { element.val(t('settings','Disable')); } },'json') - .fail(function() { + .fail(function() { OC.Settings.Apps.showErrorMessage(t('settings', 'Error while enabling app')); appitem.data('errormsg', t('settings', 'Error while enabling app')); appitem.data('active',false); diff --git a/settings/templates/apps.php b/settings/templates/apps.php index 0b76f775fea..ce48ef77d12 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -34,6 +34,11 @@ class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3> <span class="score"></span> <p class="description"></p> + <p class="documentation hidden"> + <?php p($l->t("Documentation:"));?> + <span class="userDocumentation appslink"></span> + <span class="adminDocumentation appslink"></span> + </p> <img src="" class="preview hidden" /> <p class="appslink hidden"><a href="#" target="_blank"><?php p($l->t('See application page at apps.owncloud.com'));?></a></p> |