diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2012-04-21 15:30:58 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2012-04-21 15:30:58 +0200 |
commit | 6bfe2289be05e9f54272a86a0f957ec41ef32e28 (patch) | |
tree | 2cf690624aee2f1a5fa943066d3501499f13562d /settings | |
parent | ef80ad1d48fa7cb61bb0003c0a22928f075ddc60 (diff) | |
download | nextcloud-server-6bfe2289be05e9f54272a86a0f957ec41ef32e28.tar.gz nextcloud-server-6bfe2289be05e9f54272a86a0f957ec41ef32e28.zip |
improve the app installer.
show a label if an app is an internal app or a third party app from the app store.
show a preview image of the app if available
Diffstat (limited to 'settings')
-rw-r--r-- | settings/apps.php | 7 | ||||
-rw-r--r-- | settings/css/settings.css | 3 | ||||
-rw-r--r-- | settings/js/apps.js | 3 | ||||
-rw-r--r-- | settings/templates/apps.php | 6 | ||||
-rw-r--r-- | settings/trans.png | bin | 0 -> 187 bytes |
5 files changed, 16 insertions, 3 deletions
diff --git a/settings/apps.php b/settings/apps.php index 0889b0c45ed..cc161026020 100644 --- a/settings/apps.php +++ b/settings/apps.php @@ -39,6 +39,9 @@ foreach($registeredApps as $app){ $info=OC_App::getAppInfo($app); $active=(OC_Appconfig::getValue($app,'enabled','no')=='yes')?true:false; $info['active']=$active; + $info['internal']=true; + $info['internallabel']='Internal App'; + $info['preview']='trans.png'; $apps[]=$info; } } @@ -64,6 +67,7 @@ usort($apps, 'app_sort'); } if(!$local) { + if($app['preview']=='') $pre='trans.png'; else $pre=$app['preview']; $apps[]=array( 'name'=>$app['name'], 'id'=>$app['id'], @@ -71,6 +75,9 @@ usort($apps, 'app_sort'); 'description'=>$app['description'], 'author'=>$app['personid'], 'license'=>$app['license'], + 'preview'=>$pre, + 'internal'=>false, + 'internallabel'=>'3rd Party App', ); } } diff --git a/settings/css/settings.css b/settings/css/settings.css index 42576953d04..62e84654d55 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -40,7 +40,8 @@ select.quota.active { background: #fff; } /* APPS */ li { color:#888; } li.active { color:#000; } +small.externalapp { color:#FFF; background-color:#BBB; font-weight:bold; font-size:6pt; padding:4px; border-radius: 4px;} span.version { margin-left:3em; color:#ddd; } /* LOF */ -#log { white-space:normal; }
\ No newline at end of file +#log { white-space:normal; } diff --git a/settings/js/apps.js b/settings/js/apps.js index 12d09ac69db..df5300911aa 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -13,8 +13,11 @@ $(document).ready(function(){ var app=$(this).data('app'); $('#rightcontent p').show(); $('#rightcontent span.name').text(app.name); + $('#rightcontent small.externalapp').text(app.internallabel); $('#rightcontent span.version').text(app.version); $('#rightcontent p.description').text(app.description); + $('#rightcontent img.preview').attr('src',app.preview); + $('#rightcontent small.externalapp').attr('style','visibility:visible'); $('#rightcontent span.author').text(app.author); $('#rightcontent span.licence').text(app.licence); diff --git a/settings/templates/apps.php b/settings/templates/apps.php index 1e49b4c8928..d25ca1bc7fb 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -5,7 +5,7 @@ */?> <div id="controls"> - <a class="button" target="_blank" href="http://owncloud.org/dev/writing-apps/"><?php echo $l->t('Add your application');?></a> + <a class="button" target="_blank" href="http://owncloud.org/dev/writing-apps/"><?php echo $l->t('Add your App');?></a> </div> <ul id="leftcontent"> <?php foreach($_['apps'] as $app):?> @@ -14,12 +14,14 @@ <span class="hidden"> <?php OC_JSON::encodedPrint($app,false) ?> </span> + <?php if(!$app['internal']) echo '<small class="externalapp">3rd party</small>' ?> </li> <?php endforeach;?> </ul> <div id="rightcontent"> - <h3><strong><span class="name"><?php echo $l->t('Select an App');?></span></strong><span class="version"></span></h3> + <h3><strong><span class="name"><?php echo $l->t('Select an App');?></span></strong><span class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3> <p class="description"></p> + <img src="" class="preview" /> <p class="hidden"><span class="licence"></span><?php echo $l->t('-licensed');?> <?php echo $l->t('by');?> <span class="author"></span></p> <input class="enable hidden" type="submit" /> </div> diff --git a/settings/trans.png b/settings/trans.png Binary files differnew file mode 100644 index 00000000000..e6920168bf2 --- /dev/null +++ b/settings/trans.png |