diff --git a/lib/private/app.php b/lib/private/app.php index 34c00e97fb..0c60557914 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -555,6 +555,10 @@ class OC_App{ }elseif($child->getName()=='description') { $xml=(string)$child->asXML(); $data[$child->getName()]=substr($xml, 13, -14);//script tags + }elseif($child->getName()=='documentation') { + foreach($child as $subchild) { + $data["documentation"][$subchild->getName()] = (string)$subchild; + } }else{ $data[$child->getName()]=(string)$child; } diff --git a/settings/css/settings.css b/settings/css/settings.css index a93c675d46..8a96885b78 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 a55c55e24c..1d05d01e1f 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("" + t('settings', 'User Documentation') + ""); + page.find('p.documentation').show(); + } + if (typeof(app.documentation.admin) !== 'undefined') { + adminDocumentation = true; + page.find('span.adminDocumentation').html("" + t('settings', 'Admin Documentation') + ""); + 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 0b76f775fe..ce48ef77d1 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -34,6 +34,11 @@ class="version">

+