From 6bfe2289be05e9f54272a86a0f957ec41ef32e28 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sat, 21 Apr 2012 15:30:58 +0200 Subject: [PATCH] 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 --- lib/ocsclient.php | 1 + settings/apps.php | 7 +++++++ settings/css/settings.css | 3 ++- settings/js/apps.js | 3 +++ settings/templates/apps.php | 6 ++++-- settings/trans.png | Bin 0 -> 187 bytes 6 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 settings/trans.png diff --git a/lib/ocsclient.php b/lib/ocsclient.php index 9ad9ef21c6..aef51f38fb 100755 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -162,6 +162,7 @@ class OC_OCSClient{ $app['preview3']=$tmp->smallpreviewpic3; $app['changed']=strtotime($tmp->changed); $app['description']=$tmp->description; + $app['detailpage']=$tmp->detailpage; return $app; } diff --git a/settings/apps.php b/settings/apps.php index 0889b0c45e..cc16102602 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 42576953d0..62e84654d5 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 12d09ac69d..df5300911a 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 1e49b4c892..d25ca1bc7f 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -5,7 +5,7 @@ */?>
- t('Add your application');?> + t('Add your App');?>
-

t('Select an App');?>

+

t('Select an App');?>

+
diff --git a/settings/trans.png b/settings/trans.png new file mode 100644 index 0000000000000000000000000000000000000000..e6920168bf2dbb9405040360e42095922b9e124a GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaOClDyqr82*Fc zg1yTp14TFsJR*x37`TN&n2}-D90{Nxdx@v7EBhT5QEm(I#bpa!fI>