Non-translatable string plus feature enabled check
This commit is contained in:
parent
40a444f01b
commit
a4e1b4945a
3
boot.php
3
boot.php
@ -2058,13 +2058,14 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
|||||||
'title' => t('Events and Calendar'),
|
'title' => t('Events and Calendar'),
|
||||||
'id' => 'events-tab',
|
'id' => 'events-tab',
|
||||||
);
|
);
|
||||||
|
if(feature_enabled(local_user(),'webpages')){
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Wepages'),
|
'label' => t('Wepages'),
|
||||||
'url' => $a->get_baseurl() . '/webpages/' . $nickname,
|
'url' => $a->get_baseurl() . '/webpages/' . $nickname,
|
||||||
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
|
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
|
||||||
'title' => t('Manage Webpages'),
|
'title' => t('Manage Webpages'),
|
||||||
'id' => 'webpages-tab',
|
'id' => 'webpages-tab',
|
||||||
);
|
);}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// FIXME
|
// FIXME
|
||||||
|
@ -65,7 +65,8 @@ $r = q("select * from item_id where uid = %d and service = 'WEBPAGE'",
|
|||||||
|
|
||||||
// This isn't pretty, but it works. Until I figure out what to do with the UI, it's Good Enough(TM).
|
// This isn't pretty, but it works. Until I figure out what to do with the UI, it's Good Enough(TM).
|
||||||
return $o . replace_macros(get_markup_template("webpagelist.tpl"), array(
|
return $o . replace_macros(get_markup_template("webpagelist.tpl"), array(
|
||||||
'$pages' => $pages
|
'$editlink' => t('Edit'),
|
||||||
|
'$pages' => $pages,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{{foreach $pages as $key => $items}}
|
{{foreach $pages as $key => $items}}
|
||||||
<ul class="page-list">
|
<ul class="page-list">
|
||||||
{{foreach $items as $item}}
|
{{foreach $items as $item}}
|
||||||
<li><a href="editwebpage/{{$item.url}}">Edit</a> {{$item.title}}</li>
|
<li><a href="editwebpage/{{$item.url}}">{{$editlink}}</a> {{$item.title}}</li>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
Reference in New Issue
Block a user