aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Group.php28
-rw-r--r--Zotlabs/Widget/Collections.php2
-rw-r--r--view/pdl/mod_group.pdl2
-rw-r--r--view/tpl/group_edit.tpl7
-rw-r--r--view/tpl/privacy_groups.tpl19
5 files changed, 8 insertions, 50 deletions
diff --git a/Zotlabs/Module/Group.php b/Zotlabs/Module/Group.php
index 7dcb95d85..1dce08757 100644
--- a/Zotlabs/Module/Group.php
+++ b/Zotlabs/Module/Group.php
@@ -130,20 +130,6 @@ class Group extends Controller {
if((argc() == 1) || ((argc() == 2) && (argv(1) === 'new'))) {
- $new = (((argc() == 2) && (argv(1) === 'new')) ? true : false);
-
- $groups = q("SELECT id, gname FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
- intval(local_channel())
- );
-
- $i = 0;
- foreach($groups as $group) {
- $entries[$i]['name'] = $group['gname'];
- $entries[$i]['id'] = $group['id'];
- $entries[$i]['count'] = count(AccessList::members(local_channel(), $group['id']));
- $i++;
- }
-
$hookinfo = [ 'pgrp_extras' => '', 'group'=>argv(1) ];
call_hooks ('privacygroup_extras',$hookinfo);
$pgrp_extras = $hookinfo['pgrp_extras'];
@@ -155,8 +141,6 @@ class Group extends Controller {
$tpl = get_markup_template('privacy_groups.tpl');
$o = replace_macros($tpl, [
'$title' => t('Privacy Groups'),
- '$add_new_label' => t('Add Group'),
- '$new' => $new,
// new group form
'$gname' => array('groupname',t('Privacy group name')),
@@ -166,22 +150,12 @@ class Group extends Controller {
'$submit' => t('Submit'),
'$is_default_acl' => $is_default_acl,
'$is_default_group' => $is_default_group,
-
- // groups list
- '$title' => t('Privacy Groups'),
- '$name_label' => t('Name'),
- '$count_label' => t('Members'),
- '$entries' => $entries
-
]);
return $o;
}
-
-
-
$context = array('$submit' => t('Submit'));
$tpl = get_markup_template('group_edit.tpl');
@@ -274,7 +248,7 @@ class Group extends Controller {
'$drop' => $drop_txt,
'$public' => array('public',t('Members are visible to other channels'), $group['visible'], '', [t('No'), t('Yes')]),
'$form_security_token_edit' => get_form_security_token('group_edit'),
- '$delete' => t('Delete Group'),
+ '$delete' => t('Delete'),
'$form_security_token_drop' => get_form_security_token("group_drop"),
'$pgrp_extras' => $pgrp_extras,
);
diff --git a/Zotlabs/Widget/Collections.php b/Zotlabs/Widget/Collections.php
index 774878540..ad1a10f4b 100644
--- a/Zotlabs/Widget/Collections.php
+++ b/Zotlabs/Widget/Collections.php
@@ -9,7 +9,7 @@ class Collections {
function widget($args) {
if(argc() < 2)
- return;
+ // return;
$mode = ((array_key_exists('mode',$args)) ? $args['mode'] : 'conversation');
switch($mode) {
diff --git a/view/pdl/mod_group.pdl b/view/pdl/mod_group.pdl
index 34eb7ddd1..749ede18c 100644
--- a/view/pdl/mod_group.pdl
+++ b/view/pdl/mod_group.pdl
@@ -1,5 +1,5 @@
[region=aside]
-[widget=collections][var=mode]groups[/var][/widget]
+[widget=privacygroups][/widget]
[/region]
[region=right_aside]
[widget=notifications][/widget]
diff --git a/view/tpl/group_edit.tpl b/view/tpl/group_edit.tpl
index 61203ab10..f6ab1e594 100644
--- a/view/tpl/group_edit.tpl
+++ b/view/tpl/group_edit.tpl
@@ -1,14 +1,13 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<div class="float-end">
- <button type="button" class="btn btn-sm btn-outline-secondary" onclick="openClose('group_tools')"><i class="fa fa-pencil"></i> {{$details_label}}</button>
<button id="fullscreen-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button>
<button id="inline-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button>
</div>
<h2>{{$title}}</h2>
</div>
- <div id="group_tools" class="clearfix section-content-tools-wrapper" style="display: none">
+ <div id="group_tools" class="clearfix section-content-tools-wrapper">
<form action="group/{{$gid}}" id="group-edit-form" method="post" >
<input type='hidden' name='form_security_token' value='{{$form_security_token_edit}}'>
{{include file="field_input.tpl" field=$gname}}
@@ -16,10 +15,10 @@
{{include file="field_checkbox.tpl" field=$is_default_acl}}
{{include file="field_checkbox.tpl" field=$is_default_group}}
{{$pgrp_extras}}
- <a href="group/drop/{{$gid}}?t={{$form_security_token_drop}}" onclick="return confirmDelete();" class="btn btn-sm btn-danger">
+ <a href="group/drop/{{$gid}}?t={{$form_security_token_drop}}" onclick="return confirmDelete();" class="btn btn-outline-danger">
{{$delete}}
</a>
- <button type="submit" name="submit" class="btn btn-sm btn-primary float-end">{{$submit}}</button>
+ <button type="submit" name="submit" class="btn btn-primary float-end">{{$submit}}</button>
</form>
</div>
<div class="section-content-info-wrapper">
diff --git a/view/tpl/privacy_groups.tpl b/view/tpl/privacy_groups.tpl
index 0bbc998a1..b52cec4c8 100644
--- a/view/tpl/privacy_groups.tpl
+++ b/view/tpl/privacy_groups.tpl
@@ -1,9 +1,8 @@
<div class="generic-content-wrapper">
<div class="clearfix section-title-wrapper">
- <button type="button" class="btn btn-sm btn-success float-end" onclick="openClose('group_tools')"><i class="fa fa-plus-circle"></i> {{$add_new_label}}</button>
<h2>{{$title}}</h2>
</div>
- <div id="group_tools" class="clearfix section-content-tools-wrapper"{{if ! $new}} style="display: none"{{/if}}>
+ <div id="group_tools" class="clearfix section-content-tools-wrapper">
<form action="group/new" id="group-edit-form" method="post" >
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
{{include file="field_input.tpl" field=$gname}}
@@ -11,21 +10,7 @@
{{include file="field_checkbox.tpl" field=$is_default_acl}}
{{include file="field_checkbox.tpl" field=$is_default_group}}
{{$pgrp_extras}}
- <button type="submit" name="submit" class="btn btn-sm btn-primary float-end">{{$submit}}</button>
+ <button type="submit" name="submit" class="btn btn-primary float-end">{{$submit}}</button>
</form>
</div>
-
- <table id="groups-index">
- <tr>
- <th width="99%">{{$name_label}}</th>
- <th width="1%">{{$count_label}}</th>
- </tr>
-
- {{foreach $entries as $group}}
- <tr id="groups-index-{{$group.id}}" class="group-index-row">
- <td><a href="group/{{$group.id}}">{{$group.name}}</a></td>
- <td>{{$group.count}}</td>
- </tr>
- {{/foreach}}
- </table>
</div>