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
This commit is contained in:
parent
ef80ad1d48
commit
6bfe2289be
|
@ -162,6 +162,7 @@ class OC_OCSClient{
|
||||||
$app['preview3']=$tmp->smallpreviewpic3;
|
$app['preview3']=$tmp->smallpreviewpic3;
|
||||||
$app['changed']=strtotime($tmp->changed);
|
$app['changed']=strtotime($tmp->changed);
|
||||||
$app['description']=$tmp->description;
|
$app['description']=$tmp->description;
|
||||||
|
$app['detailpage']=$tmp->detailpage;
|
||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,9 @@ foreach($registeredApps as $app){
|
||||||
$info=OC_App::getAppInfo($app);
|
$info=OC_App::getAppInfo($app);
|
||||||
$active=(OC_Appconfig::getValue($app,'enabled','no')=='yes')?true:false;
|
$active=(OC_Appconfig::getValue($app,'enabled','no')=='yes')?true:false;
|
||||||
$info['active']=$active;
|
$info['active']=$active;
|
||||||
|
$info['internal']=true;
|
||||||
|
$info['internallabel']='Internal App';
|
||||||
|
$info['preview']='trans.png';
|
||||||
$apps[]=$info;
|
$apps[]=$info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +67,7 @@ usort($apps, 'app_sort');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$local) {
|
if(!$local) {
|
||||||
|
if($app['preview']=='') $pre='trans.png'; else $pre=$app['preview'];
|
||||||
$apps[]=array(
|
$apps[]=array(
|
||||||
'name'=>$app['name'],
|
'name'=>$app['name'],
|
||||||
'id'=>$app['id'],
|
'id'=>$app['id'],
|
||||||
|
@ -71,6 +75,9 @@ usort($apps, 'app_sort');
|
||||||
'description'=>$app['description'],
|
'description'=>$app['description'],
|
||||||
'author'=>$app['personid'],
|
'author'=>$app['personid'],
|
||||||
'license'=>$app['license'],
|
'license'=>$app['license'],
|
||||||
|
'preview'=>$pre,
|
||||||
|
'internal'=>false,
|
||||||
|
'internallabel'=>'3rd Party App',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,8 @@ select.quota.active { background: #fff; }
|
||||||
/* APPS */
|
/* APPS */
|
||||||
li { color:#888; }
|
li { color:#888; }
|
||||||
li.active { color:#000; }
|
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; }
|
span.version { margin-left:3em; color:#ddd; }
|
||||||
|
|
||||||
/* LOF */
|
/* LOF */
|
||||||
#log { white-space:normal; }
|
#log { white-space:normal; }
|
||||||
|
|
|
@ -13,8 +13,11 @@ $(document).ready(function(){
|
||||||
var app=$(this).data('app');
|
var app=$(this).data('app');
|
||||||
$('#rightcontent p').show();
|
$('#rightcontent p').show();
|
||||||
$('#rightcontent span.name').text(app.name);
|
$('#rightcontent span.name').text(app.name);
|
||||||
|
$('#rightcontent small.externalapp').text(app.internallabel);
|
||||||
$('#rightcontent span.version').text(app.version);
|
$('#rightcontent span.version').text(app.version);
|
||||||
$('#rightcontent p.description').text(app.description);
|
$('#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.author').text(app.author);
|
||||||
$('#rightcontent span.licence').text(app.licence);
|
$('#rightcontent span.licence').text(app.licence);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/?>
|
*/?>
|
||||||
|
|
||||||
<div id="controls">
|
<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>
|
</div>
|
||||||
<ul id="leftcontent">
|
<ul id="leftcontent">
|
||||||
<?php foreach($_['apps'] as $app):?>
|
<?php foreach($_['apps'] as $app):?>
|
||||||
|
@ -14,12 +14,14 @@
|
||||||
<span class="hidden">
|
<span class="hidden">
|
||||||
<?php OC_JSON::encodedPrint($app,false) ?>
|
<?php OC_JSON::encodedPrint($app,false) ?>
|
||||||
</span>
|
</span>
|
||||||
|
<?php if(!$app['internal']) echo '<small class="externalapp">3rd party</small>' ?>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="rightcontent">
|
<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>
|
<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>
|
<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" />
|
<input class="enable hidden" type="submit" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 187 B |
Loading…
Reference in New Issue