apps improvements
This commit is contained in:
parent
956f0043fc
commit
55924f5c5b
@ -360,7 +360,9 @@ class Apps {
|
|||||||
'$deleted' => $papp['deleted'],
|
'$deleted' => $papp['deleted'],
|
||||||
'$feature' => (($papp['embed']) ? false : true),
|
'$feature' => (($papp['embed']) ? false : true),
|
||||||
'$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
|
'$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
|
||||||
'$navapps' => (($mode == 'nav') ? true : false)
|
'$navapps' => (($mode == 'nav') ? true : false),
|
||||||
|
'$add' => t('Add to app-tray'),
|
||||||
|
'$remove' => t('Remove from app-tray')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,8 @@ class Appman extends \Zotlabs\Web\Controller {
|
|||||||
if(Zlib\Apps::app_installed(local_channel(),$arr))
|
if(Zlib\Apps::app_installed(local_channel(),$arr))
|
||||||
info( t('App installed.') . EOL);
|
info( t('App installed.') . EOL);
|
||||||
|
|
||||||
return;
|
goaway(z_root() . '/apps');
|
||||||
|
return; //not reached
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,9 +41,12 @@ class Apps extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
return replace_macros(get_markup_template('myapps.tpl'), array(
|
return replace_macros(get_markup_template('myapps.tpl'), array(
|
||||||
'$sitename' => get_config('system','sitename'),
|
'$sitename' => get_config('system','sitename'),
|
||||||
'$cat' => ((array_key_exists('cat',$_GET) && $_GET['cat']) ? ' - ' . escape_tags($_GET['cat']) : ''),
|
'$cat' => ((array_key_exists('cat',$_GET) && $_GET['cat']) ? escape_tags($_GET['cat']) : ''),
|
||||||
'$title' => t('Apps'),
|
'$title' => t('Apps'),
|
||||||
'$apps' => $apps,
|
'$apps' => $apps,
|
||||||
|
'$authed' => ((local_channel()) ? true : false),
|
||||||
|
'$manage' => t('Manage apps'),
|
||||||
|
'$create' => (($mode == 'edit') ? t('Create new app') : '')
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -96,20 +96,6 @@ function widget_collections($args) {
|
|||||||
return group_side($every, $each, $edit, $current, $abook_id, $wmode);
|
return group_side($every, $each, $edit, $current, $abook_id, $wmode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function widget_appselect($arr) {
|
|
||||||
return replace_macros(get_markup_template('app_select.tpl'),array(
|
|
||||||
'$title' => t('Apps'),
|
|
||||||
'$system' => t('System'),
|
|
||||||
'$authed' => ((local_channel()) ? true : false),
|
|
||||||
'$personal' => t('Personal'),
|
|
||||||
'$new' => t('New App'),
|
|
||||||
'$edit' => t('Edit Apps'),
|
|
||||||
'$cat' => ((array_key_exists('cat',$_REQUEST)) ? $_REQUEST['cat'] : '')
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function widget_suggestions($arr) {
|
function widget_suggestions($arr) {
|
||||||
|
|
||||||
if((! local_channel()) || (! feature_enabled(local_channel(),'suggest')))
|
if((! local_channel()) || (! feature_enabled(local_channel(),'suggest')))
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
[region=aside]
|
[region=aside]
|
||||||
[widget=appselect][/widget]
|
|
||||||
[widget=appcategories][/widget]
|
[widget=appcategories][/widget]
|
||||||
[/region]
|
[/region]
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
{{if $install}}<button type="submit" name="install" value="{{$install}}" class="btn btn-default btn-xs" title="{{$install}}" ><i class="fa fa-arrow-circle-o-down" ></i></button>{{/if}}
|
{{if $install}}<button type="submit" name="install" value="{{$install}}" class="btn btn-default btn-xs" title="{{$install}}" ><i class="fa fa-arrow-circle-o-down" ></i></button>{{/if}}
|
||||||
{{if $edit}}<input type="hidden" name="appid" value="{{$app.guid}}" /><button type="submit" name="edit" value="{{$edit}}" class="btn btn-default btn-xs" title="{{$edit}}" ><i class="fa fa-pencil" ></i></button>{{/if}}
|
{{if $edit}}<input type="hidden" name="appid" value="{{$app.guid}}" /><button type="submit" name="edit" value="{{$edit}}" class="btn btn-default btn-xs" title="{{$edit}}" ><i class="fa fa-pencil" ></i></button>{{/if}}
|
||||||
{{if $delete}}<button type="submit" name="delete" value="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" class="btn btn-default btn-xs" title="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" ><i class="fa fa-trash-o drop-icons"></i></button>{{/if}}
|
{{if $delete}}<button type="submit" name="delete" value="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" class="btn btn-default btn-xs" title="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" ><i class="fa fa-trash-o drop-icons"></i></button>{{/if}}
|
||||||
{{if $feature}}<button type="submit" name="feature" value="feature" class="btn btn-default btn-xs" ><i class="fa fa-star"{{if $featured}} style="color: gold"{{/if}}></i></button>{{/if}}
|
{{if $feature}}<button type="submit" name="feature" value="feature" class="btn btn-default btn-xs" title="{{if $featured}}{{$remove}}{{else}}{{$add}}{{/if}}"><i class="fa fa-star"{{if $featured}} style="color: gold"{{/if}}></i></button>{{/if}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
{{if $authed}}
|
|
||||||
<div class="widget">
|
|
||||||
<h3>{{$title}}</h3>
|
|
||||||
<ul class="nav nav-pills nav-stacked">
|
|
||||||
<li><a href="appman"><i class="fa fa-plus"></i> {{$new}}</a></li>
|
|
||||||
<li><a href="apps/edit{{if $cat}}/?f=&cat={{$cat}}{{/if}}"><i class="fa fa-pencil"></i> {{$edit}}</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
|||||||
<div class="generic-content-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
<h2>{{$title}}{{$cat}}</h2>
|
{{if $authed}}
|
||||||
|
{{if $create}}
|
||||||
|
<a href="appman" class="pull-right btn btn-success btn-xs"><i class="fa fa-pencil-square-o"></i> {{$create}}</a>
|
||||||
|
{{else}}
|
||||||
|
<a href="apps/edit{{if $cat}}/?f=&cat={{$cat}}{{/if}}" class="pull-right btn btn-primary btn-xs">{{$manage}}</a>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
<h2>{{$title}}{{if $cat}} - {{$cat}}{{/if}}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="section-content-wrapper">
|
<div class="section-content-wrapper">
|
||||||
{{foreach $apps as $ap}}
|
{{foreach $apps as $ap}}
|
||||||
|
Reference in New Issue
Block a user