This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.0 has been updated
       via  8209707e0a80feadd7445abbce1ad5dc1487b6f1 (commit)
       via  2c4544cb9c7b4dd88a574bdf395e3643529cb962 (commit)
       via  da407d1b747ac5297dd1905d75ed9fcc661b3b78 (commit)
      from  d9a4e1774e85f1d49141fb3eacc8e057ac348c65 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8209707e0a80feadd7445abbce1ad5dc1487b6f1
Author: Franck Villaume <[email protected]>
Date:   Sun Mar 22 16:44:16 2015 +0100

    more clean-up

diff --git a/src/common/widget/WidgetLayoutManager.class.php 
b/src/common/widget/WidgetLayoutManager.class.php
index 7625ff8..ccbc7db 100644
--- a/src/common/widget/WidgetLayoutManager.class.php
+++ b/src/common/widget/WidgetLayoutManager.class.php
@@ -2,7 +2,7 @@
 /**
  * Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights 
reserved
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2013-2014, Franck Villaume - TrivialDev
+ * Copyright 2013-2015, Franck Villaume - TrivialDev
  *
  * This file is a part of Fusionforge.
  *
@@ -67,11 +67,6 @@ class WidgetLayoutManager {
                        $req = db_query_params($sql, array($owner_type 
,$owner_id));
                        if ($data = db_fetch_array($req)) {
                                $readonly = 
!$this->_currentUserCanUpdateLayout($owner_id, $owner_type);
-//                             if (!$readonly) {
-//                                     echo '<p class="customize"><a 
href="/widgets/widgets.php?owner='. $owner_type.$owner_id .'&amp;layout_id='. 
$data['id'] .'">'. _("Customize") .'</a></p>';
-//                             } elseif ($owner_type === 
self::OWNER_TYPE_GROUP) {
-//                                     echo '<br />';
-//                             }
                                $layout = new WidgetLayout($data['id'], 
$data['name'], $data['description'], $data['scope']);
                                $sql = 'SELECT * FROM layouts_rows WHERE 
layout_id = $1 ORDER BY rank';
                                $req_rows = 
db_query_params($sql,array($layout->id));
@@ -107,7 +102,7 @@ class WidgetLayoutManager {
         *
         * @param       int     $owner_id
         * @param       string  $owner_type
-        * @return      boolean true if the user can update the layout 
(add/remove widget, collapse, set preferences, ...)
+        * @return      boolean true if the user can update the layout 
(add/remove widget, collapse, set preferences, ...)
         */
        function _currentUserCanUpdateLayout($owner_id, $owner_type) {
                $readonly = true;
@@ -310,13 +305,9 @@ class WidgetLayoutManager {
                                echo '<tr class="layout-manager-chooser '. 
($checked ? 'layout-manager-chooser_selected' : '') .'" ><td>';
                                echo '<input type="radio" name="layout_id" 
value="'. $data['id'] .'" id="layout_'. $data['id'] .'" '. $checked .'/>';
                                echo '</td><td>';
-                               echo '<label for="layout_'. $data['id'] .'">';
-                               echo html_image('layout/'. 
strtolower(preg_replace('/(\W+)/', '-', $data['name'])) .'.png');
-                               echo '</label>';
+                               echo html_e('label', array('for' => 'layout_'. 
$data['id']), html_image('layout/'. strtolower(preg_replace('/(\W+)/', '-', 
$data['name'])) .'.png'));
                                echo '</td><td>';
-                               echo '<label for="layout_'. $data['id'] 
.'"><strong>'. $data['name'] .'</strong><br />';
-                               echo $data['description'];
-                               echo '</label>';
+                               echo html_e('label', array('for' => 'layout_'. 
$data['id']), html_e('strong', array(), 
$data['name']).html_e('br').$data['description']);
                                echo '</td></tr>';
                        }
                        /* Custom layout are not available yet */
@@ -349,15 +340,15 @@ class WidgetLayoutManager {
                                                <td 
class="layout-manager-column-add">+</td>';
                                }
                                echo '  </tr>
-                                       </table>
-                                       <div 
class="layout-manager-row-add">+</div>';
+                                       </table>';
+                               echo html_e('div', array('class' => 
'layout-manager-row-add'), '+');
                        }
                        echo '    </td>
                                </tr>
                                </table>';
                        echo '</td></tr>';
                        echo $HTML->listTableBottom();
-                       echo '<input type="submit" id="save" value="'. 
_("Submit") .'" />';
+                       echo html_e('input', array('type' => 'submit', 'id' => 
'save', 'value' => _('Submit')));
                } else {
                        // display the widget selection form
                        $after = '';
@@ -528,8 +519,7 @@ class WidgetLayoutManager {
                                        $widget_rows = array();
                                        // display widgets of the category
                                        foreach($ws as $widget_name => $widget) 
{
-                                               $row = '';
-                                               $row .= html_e('div', 
array('class' => 'widget-preview '. $widget->getPreviewCssClass()),;
+                                               $row = html_e('div', 
array('class' => 'widget-preview '. $widget->getPreviewCssClass()),
                                                                html_e('h3', 
array(), $widget->getTitle()).
                                                                html_e('p', 
array(), $widget->getDescription()).
                                                                
$widget->getInstallPreferences());

commit 2c4544cb9c7b4dd88a574bdf395e3643529cb962
Author: Franck Villaume <[email protected]>
Date:   Sun Mar 22 16:34:24 2015 +0100

    plugin wiki: missing ini file

diff --git a/src/plugins/wiki/etc/wiki.ini b/src/plugins/wiki/etc/wiki.ini
new file mode 100644
index 0000000..c72ba2b
--- /dev/null
+++ b/src/plugins/wiki/etc/wiki.ini
@@ -0,0 +1,8 @@
+[wiki]
+; current wiki status is valid
+; plugin_status is a string.
+; valid means : production ready.
+; Any other strings means it's under work or broken and plugin
+; is available in installation_environment = development only.
+plugin_status = valid
+

commit da407d1b747ac5297dd1905d75ed9fcc661b3b78
Author: Franck Villaume <[email protected]>
Date:   Sun Mar 22 16:31:08 2015 +0100

    drop dead code & use HTML helpers

diff --git a/src/common/widget/WidgetLayoutManager.class.php 
b/src/common/widget/WidgetLayoutManager.class.php
index 3b929d2..7625ff8 100644
--- a/src/common/widget/WidgetLayoutManager.class.php
+++ b/src/common/widget/WidgetLayoutManager.class.php
@@ -324,13 +324,9 @@ class WidgetLayoutManager {
                        echo '<tr class="layout-manager-chooser '. ($checked ? 
'layout-manager-chooser_selected' : '') .'"><td>';
                        echo '<input type="radio" name="layout_id" value="-1" 
id="layout_custom" '. $checked .'/>';
                        echo '</td><td>';
-                       echo '<label for="layout_custom">';
-                       echo html_image('layout/custom.png', '', '', 
array('style' => 'vertical-align:top;float:left;'));
-                       echo '</label>';
+                       echo html_e('label', array('for' => 'layout_custom'), 
html_image('layout/custom.png', '', '', array('style' => 
'vertical-align:top;float:left;')));
                        echo '</td><td>';
-                       echo '<label for="layout_custom"><strong>'. _('Custom') 
.'</strong><br />';
-                       echo _('Define your own layout:');
-                       echo '</label>';
+                       echo html_e('label', array('for' => 'layout_custom'), 
html_e('strong', array(), _('Custom')).html_e('br')._('Define your own 
layout')._(':'));
                        echo '<table id="layout-manager">
                                <tr>
                                <td>
@@ -527,44 +523,21 @@ class WidgetLayoutManager {
                                        echo html_e('li', array(), $row, false);
                                }
                                echo html_ac(html_ap() - 1);
-                       } else {
-                               foreach($widgets as $widget_name) {
-                                       if ($widget = 
Widget::getInstance($widget_name)) {
-                                               if ($widget->isAvailable()) {
-                                                       $row = '';
-                                                       $row .= '<td>'. 
$widget->getTitle() . $widget->getInstallPreferences() .'</td>';
-                                                       $row .= '<td 
class="align-right">';
-                                                       if ($widget->isUnique() 
&& in_array($widget_name, $used_widgets)) {
-                                                               $row .= '<em>'. 
_("Already used") .'</em>';
-                                                       } else {
-                                                               $row .= '<input 
type="submit" name="name['. $widget_name .'][add]" value="'. _("Add") .'" />';
-                                                       }
-                                                       $row .= '</td>';
-                                                       
$widget_rows[$widget->getTitle()] = $row;
-                                               }
-                                       }
-                               }
-                               $i = 0;
-                               foreach($widget_rows as $row) {
-                                       echo '<tr class="'. 
(count($widget_rows) ? '' : util_get_alt_row_color($i++)) .'">'. $row .'</tr>';
-                               }
-                       }
-                       if (count($categs)) {
                                foreach($categs as $c => $ws) {
                                        $i = 0;
                                        $widget_rows = array();
                                        // display widgets of the category
                                        foreach($ws as $widget_name => $widget) 
{
                                                $row = '';
-                                               $row .= '<div 
class="widget-preview '. $widget->getPreviewCssClass() .'">';
-                                               $row .= '<h3>'. 
$widget->getTitle()  .'</h3>';
-                                               $row .= '<p>'. 
$widget->getDescription() .'</p>';
-                                               $row .= 
$widget->getInstallPreferences();
-                                               $row .= '</div><div 
style="text-align:right; border-bottom:1px solid #ddd; padding-bottom:10px; 
margin-bottom:20px;">';
+                                               $row .= html_e('div', 
array('class' => 'widget-preview '. $widget->getPreviewCssClass()),;
+                                                               html_e('h3', 
array(), $widget->getTitle()).
+                                                               html_e('p', 
array(), $widget->getDescription()).
+                                                               
$widget->getInstallPreferences());
+                                               $row .= '<div 
style="text-align:right; border-bottom:1px solid #ddd; padding-bottom:10px; 
margin-bottom:20px;">';
                                                if ($widget->isUnique() && 
in_array($widget_name, $used_widgets)) {
-                                                       $row .= '<em>'. 
_("Already used") .'</em>';
+                                                       $row .= html_e('em', 
array(), _('Already used'));
                                                } else {
-                                                       $row .= '<input 
type="submit" name="name['. $widget_name .'][add]" value="'. _("Add") .'" />';
+                                                       $row .= html_e('input', 
array('type' => 'submit', 'name' => 'name['. $widget_name .'][add]', 'value' => 
_('Add')));
                                                }
                                                $row .= '</div>';
                                                
$widget_rows[$widget->getTitle()] = $row;

-----------------------------------------------------------------------

Summary of changes:
 src/common/widget/WidgetLayoutManager.class.php    |   69 +++++---------------
 .../{admssw/etc/admssw.ini => wiki/etc/wiki.ini}   |    5 +-
 2 files changed, 19 insertions(+), 55 deletions(-)
 copy src/plugins/{admssw/etc/admssw.ini => wiki/etc/wiki.ini} (84%)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to