[geeklog-hg] geeklog: Changed Admin Group Editor Rights to have 2 columns (fe...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Feb 4 08:00:44 EST 2013


changeset 8938:064dbc023ea8
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/064dbc023ea8
user: Kenji ITO <mystralkk at gmail.com>
date: Mon Feb 04 21:58:43 2013 +0900
description:
Changed Admin Group Editor Rights to have 2 columns (feature request #0001480)

diffstat:

 public_html/admin/group.php                                       |  19 +++++----
 public_html/layout/modern_curve/admin/group/groupeditor.thtml     |   2 +-
 public_html/layout/professional_css/admin/group/groupeditor.thtml |   2 +-
 3 files changed, 13 insertions(+), 10 deletions(-)

diffs (84 lines):

diff -r 13fc4d49c782 -r 064dbc023ea8 public_html/admin/group.php
--- a/public_html/admin/group.php	Mon Feb 04 21:55:44 2013 +0900
+++ b/public_html/admin/group.php	Mon Feb 04 21:58:43 2013 +0900
@@ -361,6 +361,7 @@
 {
     global $_TABLES, $_USER, $LANG_ACCESS, $_GROUP_VERBOSE;
 
+    $num_cols = 2;	// number of columns
     // this gets a bit complicated so bear with the comments
 
     // get a list of all the features that the current user (i.e. Group Admin)
@@ -419,29 +420,31 @@
     $ftcount = 0;
     $retval = '<tr>';
     for ($i = 0; $i < $nfeatures; $i++) {
+        $id = 'id-features' . $i;
         $A = DB_fetchArray($features);
 
         if ((empty($grpftarray[$A['ft_name']]) OR ($grpftarray[$A['ft_name']] == 'direct')) AND ($core != 1)) {
-            if (($ftcount > 0) && ($ftcount % 3 == 0)) {
+            if (($ftcount > 0) && ($ftcount % $num_cols == 0)) {
                 $retval .= '</tr>' . LB . '<tr>';
             }
             $pluginRow = sprintf('pluginRow%d', ($ftcount % 2) + 1);
             $ftcount++;
 
             $retval .= '<td class="' . $pluginRow . '">'
-                    . '<input type="checkbox" name="features[]" value="'
-                    . $A['ft_id'] . '"';
+                    .  '<input type="checkbox" id="' . $id . '" name="features[]" value="'
+                    .  $A['ft_id'] . '"';
             if (!empty($grpftarray[$A['ft_name']])) {
                 if ($grpftarray[$A['ft_name']] == 'direct') {
                     $retval .= ' checked="checked"';
                 }
             }
-            $retval .= XHTML . '><span title="' . $A['ft_descr'] . '">'
-                    . $A['ft_name'] . '</span></td>';
+
+            $retval .= XHTML . '><label for="' . $id . '" title="' . $A['ft_descr'] . '">'
+                    .  $A['ft_name'] . '</label></td>';
         } else {
             // either this is an indirect right OR this is a core feature
             if ((($core == 1) AND (isset($grpftarray[$A['ft_name']]) AND (($grpftarray[$A['ft_name']] == 'indirect') OR ($grpftarray[$A['ft_name']] == 'direct')))) OR ($core != 1)) {
-                if (($ftcount > 0) && ($ftcount % 3 == 0)) {
+                if (($ftcount > 0) && ($ftcount % $num_cols == 0)) {
                     $retval .= '</tr>' . LB . '<tr>';
                 }
                 $pluginRow = sprintf('pluginRow%d', ($ftcount % 2) + 1);
@@ -459,8 +462,8 @@
     }
     if ($ftcount == 0) {
         // This group doesn't have rights to any features
-        $retval .= '<td colspan="3" class="pluginRow1">'
-                . $LANG_ACCESS['grouphasnorights'] . '</td>';
+        $retval .= '<td colspan="' . $num_cols . '" class="pluginRow1">'
+                .  $LANG_ACCESS['grouphasnorights'] . '</td>';
     }
 
     $retval .= '</tr>' . LB;
diff -r 13fc4d49c782 -r 064dbc023ea8 public_html/layout/modern_curve/admin/group/groupeditor.thtml
--- a/public_html/layout/modern_curve/admin/group/groupeditor.thtml	Mon Feb 04 21:55:44 2013 +0900
+++ b/public_html/layout/modern_curve/admin/group/groupeditor.thtml	Mon Feb 04 21:58:43 2013 +0900
@@ -53,7 +53,7 @@
 
     <dl>
       <dd class="description">{lang_rightsmsg}</dd>
-      <dd><table>{rights_options}</table></dd>
+      <dd><table style="width: 100%;">{rights_options}</table></dd>
     </dl>
   </fieldset>
 
diff -r 13fc4d49c782 -r 064dbc023ea8 public_html/layout/professional_css/admin/group/groupeditor.thtml
--- a/public_html/layout/professional_css/admin/group/groupeditor.thtml	Mon Feb 04 21:55:44 2013 +0900
+++ b/public_html/layout/professional_css/admin/group/groupeditor.thtml	Mon Feb 04 21:58:43 2013 +0900
@@ -53,7 +53,7 @@
 
     <dl>
       <dd class="description">{lang_rightsmsg}</dd>
-      <dd><table>{rights_options}</table></dd>
+      <dd><table style="width: 100%;">{rights_options}</table></dd>
     </dl>
   </fieldset>
 



More information about the geeklog-cvs mailing list