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, master has been updated
       via  88c29d49b31021ac3a4e9de7d208ef98da5c3670 (commit)
       via  c1a851355e53505212670bd5f07644ffd2bbfa6a (commit)
      from  4e7fd68a531743cf8d5e679ca4f8038276da27c9 (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 88c29d49b31021ac3a4e9de7d208ef98da5c3670
Author: Franck Villaume <[email protected]>
Date:   Sun Jun 22 22:27:52 2014 +0200

    widget: use HTML helpers and make it sortable

diff --git a/src/common/widget/Widget_ProjectLatestDocuments.class.php 
b/src/common/widget/Widget_ProjectLatestDocuments.class.php
index 2f86784..2c29ea9 100644
--- a/src/common/widget/Widget_ProjectLatestDocuments.class.php
+++ b/src/common/widget/Widget_ProjectLatestDocuments.class.php
@@ -71,13 +71,15 @@ class Widget_ProjectLatestDocuments extends Widget {
                        // No documents
                        echo $HTML->warning_msg(_('This project has not 
published any documents.'));
                } else {
+                       use_javascript('/js/sortable.js');
+                       echo $HTML->getJavascripts();
                        $tabletop = array(_('Date'), _('File Name'), 
_('Title'), _('Author'), _('Path'));
                        if (session_loggedin() && (user_ismember($group_id) ||
                            forge_check_global_perm('forge_admin'))) {
                                $tabletop[] = _('Status');
                        }
-                       echo $HTML->listTableTop($tabletop, false, 
'sortable_widget_docman_listfile', 'sortable');
-                       for ($f=0; $f<$rows_files; $f++) {
+                       echo $HTML->listTableTop($tabletop, false, 
'sortable_widget_docman_listfile full', 'sortable');
+                       for ($f=0; $f < $rows_files; $f++) {
                                $updatedate = db_result($res_files, $f, 
'updatedate');
                                $createdate = db_result($res_files, $f, 
'createdate');
                                $realdate = ($updatedate >= $createdate) ? 
$updatedate : $createdate;
@@ -100,34 +102,21 @@ class Widget_ProjectLatestDocuments extends Widget {
                                                $docurl = 
util_make_link('/docman/view.php/'.$group_id.'/'.$docid.'/'.urlencode($filename),
 '<strong>'.$filename.'</strong>');
                                        }
                                }
-                               echo '
-                                       <tr '. $HTML->boxGetAltRowStyle($f+1) 
.'>
-                                               <td>'
-                                                       . 
date(_('Y-m-d'),$realdate) .
-                                               '</td>
-                                               <td>'
-                                                       .$docurl.'
-                                               </td>
-                                               <td>'
-                                                       .$title.'
-                                               </td>
-                                               <td >'
-                                                       . 
make_user_link($user_name, $realname) .
-                                               '</td>
-                                               <td>'
-                                                       . $path .
-                                               '</td>';
+                               $cells = array();
+                               $cells[][] = date(_('Y-m-d'),$realdate);
+                               $cells[][] = $docurl;
+                               $cells[][] = $title;
+                               $cells[][] = make_user_link($user_name, 
$realname);
+                               $cells[][] = $path;
                                if (session_loggedin() && 
(user_ismember($group_id) ||
                                    forge_check_global_perm('forge_admin'))) {
-                                       echo    '<td>'
-                                                       . $statename .
-                                               '</td>';
+                                       $cells[][] = $statename;
                                }
-                               echo    '</tr>';
+                               echo $HTML->multiTableRow(array(), $cells);
                        }
                        echo $HTML->listTableBottom();
                }
-               echo '<div 
class="underline-link">'.util_make_link('/docman/?group_id='.$group_id, 
_('Browse Documents Manager')) . '</div>';
+               echo html_e('div', array('class' => 'underline-link'), 
util_make_link('/docman/?group_id='.$group_id, _('Browse Documents Manager')));
        }
 
        function isAvailable() {
diff --git a/src/common/widget/Widget_ProjectLatestFileReleases.class.php 
b/src/common/widget/Widget_ProjectLatestFileReleases.class.php
index 0c94c83..3cbbe50 100644
--- a/src/common/widget/Widget_ProjectLatestFileReleases.class.php
+++ b/src/common/widget/Widget_ProjectLatestFileReleases.class.php
@@ -60,71 +60,38 @@ class Widget_ProjectLatestFileReleases extends Widget {
                        ?>
                        //<![CDATA[
                        var controllerFRS;
-
                        jQuery(document).ready(function() {
                                controllerFRS = new FRSController();
                        });
-
                        //]]>
                        <?php
                        echo html_ac(html_ap() - 1);
-                       echo '
-                               <table summary="Latest file releases" 
class="width-100p100">
-                                       <tr class="table-header">
-                                               <th class="align-left" 
scope="col">
-                                                       '._('Package').'
-                                               </th>
-                                               <th scope="col">
-                                                       '._('Version').'
-                                               </th>
-                                               <th scope="col">
-                                                       '._('Date').'
-                                               </th>
-                                               <th scope="col">
-                                                       '._('Notes').'
-                                               </th>';
+                       $titleArr = array(_('Package'), _('Version'), 
_('Date'), _('Notes'));
                        if (session_loggedin()) {
-                               echo '          <th scope="col">
-                                                       '._('Monitor').'
-                                               </th>';
+                               $titleArr[] = _('Monitor');
                        }
-                       echo '                  <th scope="col">
-                                                       '._('Download').'
-                                               </th>
-                                       </tr>';
+                       $titleArr[] = _('Download');
+                       use_javascript('/js/sortable.js');
+                       echo $HTML->getJavascripts();
+                       echo $HTML->listTableTop($titleArr, false, 
'sortable_widget_frs_listpackage full', 'sortable');
                        foreach ($frsps as $key => $frsp) {
                                $frsr = $frsp->getNewestRelease();
                                $rel_date = $frsr->getReleaseDate();
                                $package_name = $frsp->getName();
                                $package_release = $frsr->getName();
-                               echo '
-                                       <tr class="align-center">
-                                       <td class="align-left">
-                                               <strong>' . $package_name . 
'</strong>
-                                       </td>';
-                               // Releases to display
-//print '<div about="" xmlns:sioc="http://rdfs.org/sioc/ns#"; 
rel="container_of" 
resource="'.util_make_link('/frs/?group_id='.$group_id.'&release_id='.db_result($res_files,$f,'release_id').'">';
-                               echo '
-                                       <td>'
-                                       .$package_release.'
-                                       </td>
-                                       <td>'
-                                       . date(_('Y-m-d'), $rel_date).
-                                       '</td>
-                                       <td class="align-center">';
-//echo '</div>';
+                               $cells = array();
+                               $cells[] = array(html_e('strong', array(), 
$package_name), 'class' => 'align-left');
+                               $cells[][] = $package_release;
+                               $cells[][] = date(_('Y-m-d'), $rel_date);
 
                                // -> notes
                                // accessibility: image is a link, so alt must 
be unique in page => construct a unique alt
                                $tmp_alt = $package_name . " - " . _('Release 
Notes');
                                $link = '/frs/?group_id=' . $group_id . 
'&view=shownotes&release_id='.$frsr->getID();
                                $link_content = 
$HTML->getReleaseNotesPic($tmp_alt, $tmp_alt);
-                               echo util_make_link($link, $link_content);
-                               echo '</td>';
-
+                               $cells[] = array(util_make_link($link, 
$link_content), 'class' => 'align-center');
                                // -> monitor
                                if (session_loggedin()) {
-                                       echo '<td class="align-center">';
                                        $url = 
'/frs/?group_id='.$group_id.'&package_id='.$frsp->getID().'&action=monitor';
                                        if($frsp->isMonitoring()) {
                                                $title = $package_name . " - " 
. _('Stop monitoring this package');
@@ -135,23 +102,19 @@ class Widget_ProjectLatestFileReleases extends Widget {
                                                $url .= '&status=1';
                                                $image = 
$HTML->getStartMonitoringPic($title);
                                        }
-                                       echo util_make_link('#', $image, 
array('id' => 'pkgid'.$frsp->getID(), 'onclick' => 
'javascript:controllerFRS.doAction({action:\''.$url.'\', 
id:\'pkgid'.$frsp->getID().'\'})'), true);
-                                       echo '</td>';
+                                       $cells[] = array(util_make_link('#', 
$image, array('id' => 'pkgid'.$frsp->getID(), 'onclick' => 
'javascript:controllerFRS.doAction({action:\''.$url.'\', 
id:\'pkgid'.$frsp->getID().'\'})'), true), 'class' => 'align-center');
                                }
-                               echo '  <td class="align-center">';
-
                                // -> download
                                $tmp_alt = $package_name." ".$package_release." 
- ". _('Download');
                                $link_content = $HTML->getDownloadPic($tmp_alt, 
$tmp_alt);
                                $t_link_anchor = 
$HTML->toSlug($package_name)."-".$HTML->toSlug($package_release)."-title-content";
                                $link = '/frs/?group_id=' . $group_id . 
'&amp;release_id='.$frsr->getID()."#".$t_link_anchor;
-                               echo util_make_link ($link, $link_content);
-                               echo '</td>
-                               </tr>';
+                               $cells[] = array(util_make_link ($link, 
$link_content), 'class' => 'align-center');
+                               echo $HTML->multiTableRow(array(), $cells);
                        }
-                       echo '</table>';
+                       echo $HTML->listTableBottom();
                }
-               echo '<div 
class="underline-link">'.util_make_link('/frs/?group_id='.$group_id, _('View 
All Project Files')).'</div>';
+               echo html_e('div', array('class' => 'underline-link'), 
util_make_link('/frs/?group_id='.$group_id, _('View All Project Files')));
        }
 
        function isAvailable() {

commit c1a851355e53505212670bd5f07644ffd2bbfa6a
Author: Franck Villaume <[email protected]>
Date:   Sun Jun 22 22:27:08 2014 +0200

    frspackage: strings

diff --git a/src/common/frs/FRSPackage.class.php 
b/src/common/frs/FRSPackage.class.php
index f39dbd3..58bde02 100644
--- a/src/common/frs/FRSPackage.class.php
+++ b/src/common/frs/FRSPackage.class.php
@@ -385,7 +385,7 @@ class FRSPackage extends Error {
                                                array ($this->Group->getID(),
                                                       
htmlspecialchars($name))) ;
                        if (db_numrows($res)) {
-                               $this->setError(_('Error Updating Package: Name 
Already Exists'));
+                               $this->setError(_('Error Updating 
Package')._(': ')._('Name Already Exists'));
                                return false;
                        }
                }
@@ -397,14 +397,14 @@ class FRSPackage extends Error {
                                               $this->Group->getID(),
                                               $this->getID())) ;
                if (!$res || db_affected_rows($res) < 1) {
-                       $this->setError(sprintf(_('Error On Update: %s'), 
db_error()));
+                       $this->setError(_('Error On Update')._(': 
').db_error());
                        db_rollback();
                        return false;
                }
 
                $olddirname = $this->getFileName();
                if(!$this->fetchData($this->getID())){
-                       $this->setError(_("Error Updating Package: Couldn't 
fetch data"));
+                       $this->setError(_("Error Updating Package")._(': 
')._("Couldn't fetch data"));
                        db_rollback();
                        return false;
                }
@@ -414,12 +414,12 @@ class FRSPackage extends Error {
 
                if(($olddirname!=$newdirname)){
                        if(is_dir($newdirlocation)){
-                               $this->setError(_('Error Updating Package: 
Directory Already Exists'));
+                               $this->setError(_('Error Updating 
Package')._(': ')._('Directory Already Exists'));
                                db_rollback();
                                return false;
                        } else {
                                if(!@rename($olddirlocation,$newdirlocation)) {
-                                       $this->setError(_("Error Updating 
Package: Couldn't rename dir"));
+                                       $this->setError(_("Error Updating 
Package")._(': ')._("Couldn't rename dir"));
                                        db_rollback();
                                        return false;
                                }

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

Summary of changes:
 src/common/frs/FRSPackage.class.php                |   10 +--
 .../widget/Widget_ProjectLatestDocuments.class.php |   37 ++++-------
 .../Widget_ProjectLatestFileReleases.class.php     |   69 +++++---------------
 3 files changed, 34 insertions(+), 82 deletions(-)


hooks/post-receive
-- 
FusionForge

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

Reply via email to