diff options
-rw-r--r-- | Zotlabs/Lib/Apps.php | 19 | ||||
-rw-r--r-- | Zotlabs/Module/New_channel.php | 8 | ||||
-rw-r--r-- | Zotlabs/Module/Oauth.php | 2 | ||||
-rwxr-xr-x | view/tpl/new_channel.tpl | 38 |
4 files changed, 44 insertions, 23 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 519d5f35a..aef6756b5 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -337,7 +337,20 @@ class Apps { 'Profiles' => t('Profiles'), 'Privacy Groups' => t('Privacy Groups'), 'Notifications' => t('Notifications'), - 'Order Apps' => t('Order Apps') + 'Order Apps' => t('Order Apps'), + 'CalDAV' => t('CalDAV'), + 'CardDAV' => t('CardDAV'), + 'Channel Sources' => t('Channel Sources'), + 'Gallery' => t('Gallery'), + 'Guest Access' => t('Guest Access'), + 'Notes' => t('Notes'), + 'OAuth Apps Manager' => t('OAuth Apps Manager'), + 'OAuth2 Apps Manager' => t('OAuth2 Apps Manager'), + 'PDL Editor' => t('PDL Editor'), + 'Permission Categories' => t('Permission Categories'), + 'Premium Channel' => t('Premium Channel'), + 'Public Stream' => t('Public Stream'), + 'My Chatrooms' => t('My Chatrooms') ); if(array_key_exists('name',$arr)) { @@ -349,6 +362,9 @@ class Apps { for($x = 0; $x < count($arr); $x++) { if(array_key_exists($arr[$x]['name'],$apps)) { $arr[$x]['name'] = $apps[$arr[$x]['name']]; + } else { + // Try to guess by app name if not in list + $arr[$x]['name'] = t(trim($arr[$x]['name'])); } } } @@ -763,7 +779,6 @@ class Apps { call_hooks('app_list',$hookinfo); $r = $hookinfo['apps']; for($x = 0; $x < count($r); $x ++) { - $r[$x]['app_name']=t(trim($r[$x]['app_name'])); if(! $r[$x]['app_system']) $r[$x]['type'] = 'personal'; $r[$x]['term'] = q("select * from term where otype = %d and oid = %d", diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php index 97a46a43e..ebdd6c37f 100644 --- a/Zotlabs/Module/New_channel.php +++ b/Zotlabs/Module/New_channel.php @@ -142,9 +142,12 @@ class New_channel extends \Zotlabs\Web\Controller { } $limit = account_service_class_fetch(get_account_id(),'total_identities'); - + $canadd = true; if($r && ($limit !== false)) { $channel_usage_message = sprintf( t("You have created %1$.0f of %2$.0f allowed channels."), $r[0]['total'], $limit); + if ($r[0]['total'] >= $limit) { + $canadd = false; + } } else { $channel_usage_message = ''; @@ -186,7 +189,8 @@ class New_channel extends \Zotlabs\Web\Controller { '$nickname' => $nickname, '$validate' => t('Validate'), '$submit' => t('Create'), - '$channel_usage_message' => $channel_usage_message + '$channel_usage_message' => $channel_usage_message, + '$canadd' => $canadd )); return $o; diff --git a/Zotlabs/Module/Oauth.php b/Zotlabs/Module/Oauth.php index 5aae71ae7..fbcc48ead 100644 --- a/Zotlabs/Module/Oauth.php +++ b/Zotlabs/Module/Oauth.php @@ -98,7 +98,7 @@ class Oauth extends Controller { App::$pdl = ''; $o = '<b>OAuth Apps Manager App (Not Installed):</b><br>'; - $o .= t('OAuth authenticatication tokens for mobile and remote apps'); + $o .= t('OAuth authentication tokens for mobile and remote apps'); return $o; } diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl index 51880e1f6..8d72df55b 100755 --- a/view/tpl/new_channel.tpl +++ b/view/tpl/new_channel.tpl @@ -13,23 +13,25 @@ </div> {{/if}} {{/if}} - <form action="new_channel" method="post" id="newchannel-form"> - {{if $default_role}} - <input type="hidden" name="permissions_role" value="{{$default_role}}" /> - {{else}} - {{include file="field_select_grouped.tpl" field=$role}} - {{/if}} - - {{include file="field_input.tpl" field=$name}} - - {{include file="field_input.tpl" field=$nickname}} - <button class="btn btn-primary" type="submit" id="newchannel-submit-button">{{$submit}}</button> - - - <div id="newchannel-submit-end" class="clear"></div> - - <div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div> - <div id="newchannel-import-end" class="clear"></div> - </form> + {{if $canadd}} + <form action="new_channel" method="post" id="newchannel-form"> + {{if $default_role}} + <input type="hidden" name="permissions_role" value="{{$default_role}}" /> + {{else}} + {{include file="field_select_grouped.tpl" field=$role}} + {{/if}} + + {{include file="field_input.tpl" field=$name}} + + {{include file="field_input.tpl" field=$nickname}} + <button class="btn btn-primary" type="submit" id="newchannel-submit-button">{{$submit}}</button> + + + <div id="newchannel-submit-end" class="clear"></div> + + <div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div> + <div id="newchannel-import-end" class="clear"></div> + </form> + {{/if}} </div> </div> |