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  737a9a701105ea19f90f571fe3f1c8434636e69a (commit)
       via  174a50d3f954dda8ad97e9d42cd8436ce1a5c90a (commit)
      from  acc792cbd36773a1e2f2f8fd42e09d4e951f1511 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=737a9a701105ea19f90f571fe3f1c8434636e69a

commit 737a9a701105ea19f90f571fe3f1c8434636e69a
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 13 16:20:27 2015 +0100

    docman searchengine: add edit file action. use HTML helpers

diff --git a/src/CHANGES b/src/CHANGES
index 960d86c..717fcd4 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -5,6 +5,8 @@ FusionForge 6.X:
 * Docman: limit number of returned documents on search query. Use paging 
system [#794] (TrivialDev)
 * Docman: limit search using from & to dates [#798] (TrivialDev)
 * Docman: use standard search engine: unify results between 'search in 
project' & search in the docs tab (TrivialDev)
+* Docman: searchengine: DocsAll & Docs unified. (TrivialDev)
+* Docman: searchengine: add edit file action on result. (TrivialDev)
 * Plugin AuthBuiltin: add captcha after 3 attempts with the same login [#795] 
(TrivialDev)
 
 FusionForge 6.0.4:
diff --git a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php 
b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
index c303d1d..7c1303d 100644
--- a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
@@ -50,9 +50,10 @@ class DocsHtmlSearchRenderer extends HtmlGroupSearchRenderer 
{
 
                $this->tableHeaders = array(
                        _('Directory'),
-                       _('#'),
+                       _('&nbsp;'),
                        _('Title'),
-                       _('Description')
+                       _('Description'),
+                       _('Actions')
                );
        }
 
@@ -66,6 +67,7 @@ class DocsHtmlSearchRenderer extends HtmlGroupSearchRenderer {
                        return '';
                }
 
+               global $HTML;
                $rowsCount = $this->searchQuery->getRowsCount();
                $result =& $this->searchQuery->getResult();
 
@@ -80,17 +82,25 @@ class DocsHtmlSearchRenderer extends 
HtmlGroupSearchRenderer {
                        $groupObject = group_get_object($this->groupId);
                        $document = new Document($groupObject, 
db_result($result, $i, 'docid'));
                        if ($lastDocGroup != $currentDocGroup) {
-                               $return .= 
'<tr><td>'.html_image('ic/cfolder15.png', '10', '12', array('border' => 
'0')).util_make_link('/docman/?group_id='.$this->groupId.'&view=listfile&dirid='.$document->getDocGroupID(),$currentDocGroup).'</td><td
 colspan="3">&nbsp;</td></tr>';
+                               $return .= '<tr><td 
colspan="4">'.html_image('ic/folder.png', 22, 22, array('border' => 
'0')).util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID(),$currentDocGroup).'</td></tr>';
                                $lastDocGroup = $currentDocGroup;
                                $rowColor = 0;
                        }
-                       $return .= '<tr '. 
$GLOBALS['HTML']->boxGetAltRowStyle($rowColor) .'>'
-                               . '<td>&nbsp;</td>'
-                               . '<td>'.db_result($result, $i, 'docid').'</td>'
-                               . '<td><a href="'.util_make_url 
('/docman/view.php/'.$this->groupId . '/'.db_result($result, $i, 
'docid').'/'.db_result($result, $i, 'filename')).'">'
-                               . html_image('ic/msg.png', '10', '12')
-                               . ' '.db_result($result, $i, 
'title').'</a></td>'
-                               . '<td>'.db_result($result, $i, 
'description').'</td></tr>';
+                       $cells = array();
+                       $cells[][] = '&nbsp;';
+                       $cells[][] = 
util_make_link('/docman/view.php/'.$document->Group->getID().'/'.$document->getID().'/'.urlencode($document->getFileName()),
 html_image($document->getFileTypeImage(), 22, 22));
+                       $cells[][] = db_result($result, $i, 'title');
+                       $cells[][] = db_result($result, $i, 'description');
+                       if (forge_check_perm('docman', 
$document->Group->getID(), 'approve')) {
+                               if (!$document->getLocked() && 
!$document->getReserved()) {
+                                       $cells[][] = 
util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID().'&filedetailid='.db_result($result,
 $i, 'docid'), html_image('docman/edit-file.png', 22, 22, array('alt' => 
_('Edit this document'))));
+                               } else {
+                                       $cells[][] = '&nbsp;';
+                               }
+                       } else {
+                               $cells[][] = '&nbsp;';
+                       }
+                       $return .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle($rowColor, true)), $cells);
                        $rowColor++;
                }
                return $return;

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=174a50d3f954dda8ad97e9d42cd8436ce1a5c90a

commit 174a50d3f954dda8ad97e9d42cd8436ce1a5c90a
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 13 16:19:43 2015 +0100

    docman: space

diff --git a/src/common/docman/views/listfile.php 
b/src/common/docman/views/listfile.php
index 6e908ad..1a8cc97 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -326,7 +326,7 @@ if (isset($nested_docs[$dirid]) && 
is_array($nested_docs[$dirid])) {
                        $editfileaction .= '&group_id='.$GLOBALS['group_id'];
                        if (!$d->getLocked() && !$d->getReserved()) {
                                $nextcell .= 
util_make_link($redirecturl.'&action=trashfile&fileid='.$d->getID(), 
$HTML->getDeletePic(_('Move this document to trash'), 'delfile'));
-                               $nextcell .= util_make_link('#', 
html_image('docman/edit-file.png',22,22,array('alt'=>_('Edit this document'))), 
array('onclick' => 
'javascript:controllerListFile.toggleEditFileView({action:\''.util_make_uri($editfileaction).'\',
 lockIntervalDelay: 60000, childGroupId: '.util_ifsetor($childgroup_id, 0).' 
,id:'.$d->getID().', groupId:'.$d->Group->getID().', 
docgroupId:'.$d->getDocGroupID().', statusId:'.$d->getStateID().', 
statusDict:'.$dm->getStatusNameList('json').', 
docgroupDict:'.$dm->getDocGroupList($nested_groups, 'json').', 
title:\''.addslashes($d->getName()).'\', 
filename:\''.addslashes($d->getFilename()).'\', 
description:\''.addslashes($d->getDescription()).'\', 
isURL:\''.$d->isURL().'\', isText:\''.$d->isText().'\', 
isHtml:\''.$d->isHtml().'\', useCreateOnline:'.$d->Group->useCreateOnline().', 
docManURL:\''.util_make_uri('/docman').'\'})', 'title' => _('Edit this 
document')), true);
+                               $nextcell .= util_make_link('#', 
html_image('docman/edit-file.png', 22, 22, array('alt' => _('Edit this 
document'))), array('onclick' => 
'javascript:controllerListFile.toggleEditFileView({action:\''.util_make_uri($editfileaction).'\',
 lockIntervalDelay: 60000, childGroupId: '.util_ifsetor($childgroup_id, 0).' 
,id:'.$d->getID().', groupId:'.$d->Group->getID().', 
docgroupId:'.$d->getDocGroupID().', statusId:'.$d->getStateID().', 
statusDict:'.$dm->getStatusNameList('json').', 
docgroupDict:'.$dm->getDocGroupList($nested_groups, 'json').', 
title:\''.addslashes($d->getName()).'\', 
filename:\''.addslashes($d->getFilename()).'\', 
description:\''.addslashes($d->getDescription()).'\', 
isURL:\''.$d->isURL().'\', isText:\''.$d->isText().'\', 
isHtml:\''.$d->isHtml().'\', useCreateOnline:'.$d->Group->useCreateOnline().', 
docManURL:\''.util_make_uri('/docman').'\'})', 'title' => _('Edit this 
document')), true);
                                if (session_loggedin()) {
                                        $nextcell .= 
util_make_link($redirecturl.'&action=reservefile&fileid='.$d->getID(), 
html_image('docman/reserve-document.png', 22, 22, array('alt' => _('Reserve 
this document'))), array('title' => _('Reserve this document for later 
edition')));
                                }

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

Summary of changes:
 src/CHANGES                                        |  2 ++
 src/common/docman/views/listfile.php               |  2 +-
 .../renderers/DocsHtmlSearchRenderer.class.php     | 30 ++++++++++++++--------
 3 files changed, 23 insertions(+), 11 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