[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1290-gc4c8080

Franck Villaume nerville at libremir.placard.fr.eu.org
Mon Dec 26 11:59:11 CET 2016


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  c4c808007600d2aadb8fda50f7cb88e26ec42a49 (commit)
      from  4ddb7807a04e6d33270b9892473e15f9f39a9d28 (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=c4c808007600d2aadb8fda50f7cb88e26ec42a49

commit c4c808007600d2aadb8fda50f7cb88e26ec42a49
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Dec 26 11:58:31 2016 +0100

    docman widgets: small enhancements: display user pop-up, add description as title, remove useless vars, clean doc url, use permalink

diff --git a/src/common/widget/Widget_MyProjectsLastDocuments.class.php b/src/common/widget/Widget_MyProjectsLastDocuments.class.php
index 7c4a69b..e2e5729 100644
--- a/src/common/widget/Widget_MyProjectsLastDocuments.class.php
+++ b/src/common/widget/Widget_MyProjectsLastDocuments.class.php
@@ -110,12 +110,12 @@ class Widget_MyProjectsLastDocuments extends Widget {
 										break;
 									}
 									default: {
-										$docurl = util_make_link('/docman/view.php/'.$g->getID().'/'.$doc->getID().'/'.urlencode($doc->getFileName()), html_image($doc->getFileTypeImage(), 22, 22, array('alt'=>$doc->getFileType())));
+										$docurl = util_make_link('/docman/view.php/'.$g->getID().'/'.$doc->getID(), html_image($doc->getFileTypeImage(), 22, 22, array('alt'=>$doc->getFileType())));
 									}
 								}
 								$html .= '<td>'.$docurl.'</td>';
 								$html .= '<td>'.$doc->getFileName().'</td>';
-								$html .= '<td>'.make_user_link($doc->getCreatorUserName(), $doc->getCreatorRealName()).'</td>';
+								$html .= '<td>'.util_display_user($doc->getCreatorUserName(), $doc->getCreatorID(), $doc->getCreatorRealName()).'</td>';
 								if ( $doc->getUpdated() ) {
 									$html .= '<td>'.date(_('Y-m-d H:i'), $doc->getUpdated()).'</td>';
 								} else {
diff --git a/src/common/widget/Widget_ProjectLatestDocuments.class.php b/src/common/widget/Widget_ProjectLatestDocuments.class.php
index c72cbb4..3ec4a30 100644
--- a/src/common/widget/Widget_ProjectLatestDocuments.class.php
+++ b/src/common/widget/Widget_ProjectLatestDocuments.class.php
@@ -94,10 +94,6 @@ class Widget_ProjectLatestDocuments extends Widget {
 					$createdate = $doc->getCreated();
 					$realdate = ($updatedate >= $createdate) ? $updatedate : $createdate;
 					$filename = $doc->getFileName();
-					$title = $doc->getName();
-					$realname = $doc->getCreatorRealName();
-					$user_name = $doc->getCreatorUserName();
-					$statename = $doc->getStateName();
 					$filetype = $doc->getFileType();
 					$docid = $doc->getID();
 					$docgroup = $doc->getDocGroupID();
@@ -109,18 +105,18 @@ class Widget_ProjectLatestDocuments extends Widget {
 							break;
 						}
 						default: {
-							$docurl = util_make_link('/docman/view.php/'.$group_id.'/'.$docid.'/'.urlencode($filename), html_image($doc->getFileTypeImage(), 22, 22, array('alt'=>$doc->getFileType())));
+							$docurl = util_make_link('/docman/view.php/'.$group_id.'/'.$docid, html_image($doc->getFileTypeImage(), 22, 22, array('alt'=>$doc->getFileType())));
 						}
 					}
 					$cells = array();
-					$cells[][] = date(_('Y-m-d'),$realdate);
+					$cells[][] = date(_('Y-m-d'), $realdate);
 					$cells[][] = $docurl;
 					$cells[][] = $filename;
-					$cells[][] = $title;
-					$cells[][] = make_user_link($user_name, $realname);
+					$cells[] = array($doc->getName(), 'title' => $doc->getDescription());
+					$cells[][] = util_display_user($doc->getCreatorUserName(), $doc->getCreatorID(), $doc->getCreatorRealName());
 					$cells[][] = $path;
 					if (session_loggedin()) {
-						$cells[][] = $statename;
+						$cells[][] = $doc->getStateName();
 						$action = '';
 						if ($doc->getStateID() != 2) {
 							if ($doc->isMonitoredBy(UserManager::instance()->getCurrentUser()->getID())) {
@@ -135,7 +131,7 @@ class Widget_ProjectLatestDocuments extends Widget {
 							$action .= util_make_link('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$docgroup.'&action=monitorfile&option='.$option.'&fileid='.$doc->getID(), $image, array('title' => $titleMonitor));
 							if (forge_check_perm('docman', $group_id, 'approve') && !$doc->getLocked()) {
 								$action .= util_make_link('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$docgroup.'&action=trashfile&fileid='.$doc->getID(), $HTML->getDeletePic('', _('Move this document to trash')), array('title' => _('Move this document to trash')));
-								$action .= util_make_link('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$docgroup.'&filedetailid='.$doc->getID(), $HTML->getEditFilePic(_('Edit this document')), array('title' => _('Edit this document')));
+								$action .= util_make_link($doc->getPermalink(), $HTML->getEditFilePic(_('Edit this document')), array('title' => _('Edit this document')));
 							}
 						}
 						$cells[][] = $action;

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

Summary of changes:
 .../widget/Widget_MyProjectsLastDocuments.class.php      |  4 ++--
 .../widget/Widget_ProjectLatestDocuments.class.php       | 16 ++++++----------
 2 files changed, 8 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list