[Fusionforge-commits] FusionForge branch master updated. v6.0.3-301-ga7b3882

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Dec 26 11:41:20 CET 2015


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  a7b38820aef23ca07974a8f08a2541ce8840acd5 (commit)
       via  8087e7a17b4448abf26a02f26094d8ae2250b218 (commit)
       via  c79b291d8db0065f0e85cc618d878275f8f265a8 (commit)
       via  0114eac0fb62e008eea7548226e2a0c6a48e795c (commit)
       via  c5e4d70723969aeb3744c8f144aaa8469699c2b8 (commit)
      from  333bec2f4f99bc15f5264fae2655618a6eaf16a7 (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=a7b38820aef23ca07974a8f08a2541ce8840acd5

commit a7b38820aef23ca07974a8f08a2541ce8840acd5
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 25 15:44:27 2015 +0100

    Navigation: fix selected tab on global search: docs, people, skill, soft (projects)

diff --git a/src/common/include/Navigation.class.php b/src/common/include/Navigation.class.php
index cfdff3b..ba3a195 100644
--- a/src/common/include/Navigation.class.php
+++ b/src/common/include/Navigation.class.php
@@ -295,7 +295,7 @@ class Navigation extends Error {
 			$menu['titles'][] = _('Site Admin');
 			$menu['urls'][] = util_make_uri('/admin/');
 			$menu['tooltips'][] = _('Administration Submenu to handle global configuration, users & projects.');
-			if (strstr($request_uri, util_make_uri('/admin/')) || strstr($request_uri, 'globaladmin')) {
+			if (strstr($request_uri, util_make_uri('/admin/')) || strstr($request_uri, 'type=globaladmin')) {
 				$selected = count($menu['urls'])-1;
 			}
 		}
@@ -309,7 +309,11 @@ class Navigation extends Error {
 		}
 
 		// Project
-		if (isset($GLOBALS['group_id'])) {
+		if (isset($GLOBALS['group_id']) &&
+			!strstr($request_uri, '/search/?type_of_search=alldocs') &&
+			!strstr($request_uri, '/search/?type_of_search=skill') &&
+			!strstr($request_uri, '/search/?type_of_search=people') &&
+			!strstr($request_uri, '/search/?type_of_search=soft')) {
 			// get group info using the common result set
 			$project = group_get_object($GLOBALS['group_id']);
 			if (is_int($project) && $project == 0) {
@@ -325,11 +329,11 @@ class Navigation extends Error {
 					$menu['titles'][] = $project->getPublicName();
 					$menu['tooltips'][] = _('Project home page, widgets selected to follow specific items.');
 					if (isset ($GLOBALS['sys_noforcetype']) && $GLOBALS['sys_noforcetype']) {
-						$menu['urls'][]=util_make_uri('/project/?group_id') .$project->getId();
+						$menu['urls'][] = util_make_uri('/project/?group_id') .$project->getId();
 					} else {
-						$menu['urls'][]=util_make_uri('/projects/') .$project->getUnixName().'/';
+						$menu['urls'][] = util_make_uri('/projects/') .$project->getUnixName().'/';
 					}
-					$selected=count($menu['urls'])-1;
+					$selected = count($menu['urls'])-1;
 				}
 			}
 		}

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

commit 8087e7a17b4448abf26a02f26094d8ae2250b218
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 25 15:43:07 2015 +0100

    search engine: remove useless param in header

diff --git a/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php b/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php
index a734da3..0564152 100644
--- a/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php
@@ -68,7 +68,7 @@ class DocsAllHtmlSearchRenderer extends HtmlSearchRenderer {
 	 * writeHeader - write the header of the output
 	 */
 	function writeHeader() {
-		$GLOBALS['HTML']->header(array('title'=>_('Search for documents'), 'pagename'=>'search'));
+		$GLOBALS['HTML']->header(array('title'=>_('Search for documents')));
 		parent::writeHeader();
 	}
 

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

commit c79b291d8db0065f0e85cc618d878275f8f265a8
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 25 14:57:57 2015 +0100

    search engine: unify label visit the link, use html helpers

diff --git a/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php b/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php
index bfd2c21..a734da3 100644
--- a/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/DocsAllHtmlSearchRenderer.class.php
@@ -5,7 +5,7 @@
  * Copyright 2004 (c) Dominik Haas, GForge Team
  * Copyright 2011, Franck Villaume - Capgemini
  * Copyright 2013, French Ministry of National Education
- * Copyright 2013,2015 Franck Villaume - TrivialDev
+ * Copyright 2013,2015, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -58,6 +58,7 @@ class DocsAllHtmlSearchRenderer extends HtmlSearchRenderer {
 		$this->tableHeaders = array(
 			_('Project'),
 			_('Directory'),
+			'',
 			_('Title'),
 			_('Description')
 		);
@@ -77,34 +78,42 @@ class DocsAllHtmlSearchRenderer extends HtmlSearchRenderer {
 	 * @return string html output
 	 */
 	function getRows() {
+		global $HTML;
 		$rowsCount = $this->searchQuery->getRowsCount();
 		$result =& $this->searchQuery->getResult();
 
 		$return = '';
 
-		$lastDocGroup = null;
+		$lastGroupID = null;
+		$lastDocGroupID = null;
 
 		$rowColor = 0;
 		for($i = 0; $i < $rowsCount; $i++) {
+			$cells = array();
+			$document = document_get_object(db_result($result, $i, 'docid'), db_result($result, $i, 'group_id'));
 			$currentDocGroup = db_result($result, $i, 'project_name');
-			$currentDocGroupObject = group_get_object_by_publicname($currentDocGroup);
-			if ($lastDocGroup != $currentDocGroup) {
-				$return .= '<tr><td>'.html_image('ic/home16b.png', '10', '12', array('border' => '0')).'<b>'.util_make_link('/docman/?group_id='.$currentDocGroupObject->getID(),$currentDocGroup).'</b></td><td colspan="3"> </td></tr>';
-				$lastDocGroup = $currentDocGroup;
+			if ($lastGroupID != $document->Group->getID()) {
+				$cells[] = array(html_image('ic/home16b.png', 10, 12, array('border' => 0)).'<b>'.util_make_link('/docman/?group_id='.$document->Group->getID(),$currentDocGroup).'</b>', 'colspan' => 4);
+				$lastGroupID = $document->Group->getID();
 				$rowColor = 0;
+				$return .= $HTML->multiTableRow(array(), $cells);
 			}
-			$document = new Document($currentDocGroupObject, db_result($result, $i, 'docid'));
-			$return .= '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) .'>'
-						. '<td> </td>'
-						. '<td>'.html_image('ic/cfolder15.png', '10', '12', array('border' => '0')).util_make_link('/docman/?group_id='.$currentDocGroupObject->getID().'&view=listfile&dirid='.$document->getDocGroupID(),db_result($result, $i, 'groupname')).'</td>';
-						if (db_result($result, $i, 'filetype') == 'URL') {
-							$return .= '<td><a href="'.db_result($result, $i, 'filename').'">';
-						} else {
-							$return .= '<td><a href="'.util_make_url('/docman/view.php/'.db_result($result, $i, 'group_id') . '/'.db_result($result, $i, 'docid').'/'.db_result($result, $i, 'filename')).'">';
-						}
-			$return .= html_image('ic/msg.png', '10', '12', array('border' => '0'))
-						. ' '.db_result($result, $i, 'title').'</a></td>'
-						. '<td>'.db_result($result, $i, 'description').'</td></tr>';
+			$cells = array();
+			$cells[][] = ' ';
+			if ($lastDocGroupID != $document->getDocGroupID()) {
+				$cells[][] = html_image('ic/folder.png', 22, 22, array('border' => 0)).util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID(),db_result($result, $i, 'groupname'));
+				$lastDocGroupID = $document->getDocGroupID();
+			} else {
+				$cells[][] = '&nbsp';
+			}
+			if ($document->isURL()) {
+				$cells[][] = util_make_link($document->getFileName(), html_image($document->getFileTypeImage(), 22, 22), array('title' => _('Visit this link')), true);
+			} else {
+				$cells[][] = util_make_link('/docman/view.php/'.db_result($result, $i, 'group_id') . '/'.db_result($result, $i, 'docid').'/'.db_result($result, $i, 'filename'), html_image($document->getFileTypeImage(), 22, 22), array('title' => _('View this document')));
+			}
+			$cells[][] = db_result($result, $i, 'title');
+			$cells[][] = db_result($result, $i, 'description');
+			$return .= $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($rowColor, true)), $cells);
 			$rowColor++;
 		}
 		return $return;
diff --git a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
index a9d78fa..f460dc4 100644
--- a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
@@ -125,7 +125,7 @@ class DocsHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 				}
 			}
 			if ($document->isURL()) {
-				$cells[][] = util_make_link($document->getFileName(), html_image($document->getFileTypeImage(), 22, 22), array('title' => _('Follow this link')), true);
+				$cells[][] = util_make_link($document->getFileName(), html_image($document->getFileTypeImage(), 22, 22), array('title' => _('Visit this link')), true);
 			} else {
 				$cells[][] = util_make_link('/docman/view.php/'.$document->Group->getID().'/'.$document->getID().'/'.urlencode($document->getFileName()), html_image($document->getFileTypeImage(), 22, 22), array('title' => _('View this document')));
 			}

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

commit 0114eac0fb62e008eea7548226e2a0c6a48e795c
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 25 14:57:03 2015 +0100

    docman: remove useless quote & space

diff --git a/src/common/docman/views/listfile.php b/src/common/docman/views/listfile.php
index 0e74c23..25782cb 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -208,7 +208,7 @@ if ($DocGroupName) {
 	if (forge_check_perm('docman', $group_id, 'approve'))
 		$numPendingFiles = $ndg->getNumberOfDocuments(3);
 	if ($numFiles || (isset($numPendingFiles) && $numPendingFiles))
-		echo util_make_link('/docman/view.php/'.$ndg->Group->getID().'/zip/full/'.$dirid, html_image('docman/download-directory-zip.png',22,22,array('alt'=>'downloadaszip')), array('title' => _('Download this folder as a ZIP')));
+		echo util_make_link('/docman/view.php/'.$ndg->Group->getID().'/zip/full/'.$dirid, html_image('docman/download-directory-zip.png', 22, 22, array('alt' => 'downloadaszip')), array('title' => _('Download this folder as a ZIP')));
 
 	if (session_loggedin()) {
 		if ($ndg->isMonitoredBy($LUSER->getID())) {
@@ -269,11 +269,11 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 		}
 		switch ($d->getFileType()) {
 			case 'URL': {
-				$cells[][] =  util_make_link($d->getFileName(), html_image($d->getFileTypeImage(), '22', '22', array('alt' => $d->getFileType())), array('title' => _('Visit this link')), true);
+				$cells[][] =  util_make_link($d->getFileName(), html_image($d->getFileTypeImage(), 22, 22, array('alt' => $d->getFileType())), array('title' => _('Visit this link')), true);
 				break;
 			}
 			default: {
-				$cells[][] =  util_make_link('/docman/view.php/'.$d->Group->getID().'/'.$d->getID().'/'.urlencode($d->getFileName()), html_image($d->getFileTypeImage(), '20', '20', array('alt' => $d->getFileType())), array('title' => _('View this document')));
+				$cells[][] =  util_make_link('/docman/view.php/'.$d->Group->getID().'/'.$d->getID().'/'.urlencode($d->getFileName()), html_image($d->getFileTypeImage(), 22, 22, array('alt' => $d->getFileType())), array('title' => _('View this document')));
 			}
 		}
 		$nextcell = '';
@@ -291,7 +291,7 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 		}
 		$nextcell = '';
 		if ($d->getReserved()) {
-			$nextcell = html_image('docman/document-reserved.png', '22', '22', array('alt' => _('Reserved Document'), 'title' => _('Reserved Document')));
+			$nextcell = html_image('docman/document-reserved.png', 22, 22, array('alt' => _('Reserved Document'), 'title' => _('Reserved Document')));
 			$reserved_by = $d->getReservedBy();
 			if ($reserved_by) {
 				$user = user_get_object($reserved_by);

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

commit c5e4d70723969aeb3744c8f144aaa8469699c2b8
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 25 14:30:56 2015 +0100

    plugin taskboard: fix php warning & allow date js translation

diff --git a/src/plugins/taskboard/common/views/releases/add_release.php b/src/plugins/taskboard/common/views/releases/add_release.php
index 7ab9bec..5814e02 100644
--- a/src/plugins/taskboard/common/views/releases/add_release.php
+++ b/src/plugins/taskboard/common/views/releases/add_release.php
@@ -1,6 +1,7 @@
 <?php
 /**
  * Copyright (C) 2015 Vitaliy Pylypiv <vitaliy.pylypiv at gmail.com>
+ * Copyright 2015, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
@@ -57,27 +58,28 @@ foreach ( $release_values as $release_name => $release_id ) {
 	}
 }
 
-$release_box = html_build_select_box_from_arrays($release_id_arr, $release_name_arr, '_release', $element_id, false);
+$release_box = html_build_select_box_from_arrays($release_id_arr, $release_name_arr, '_release', false, false);
 echo $HTML->openForm(array('action' => '/plugins/'.$pluginTaskboard->name.'/releases/?group_id='.$group_id.'&action=add_release', 'method' => 'post'));
 echo html_e('input', array('type' => 'hidden', 'name' => 'post_changes', 'value' => 'y'));
 echo html_e('h2', array(), _('Add release')._(':'));
 echo $HTML->listTableTop();
 ?>
 	<tr><td><strong><?php echo _('Release') ?></strong> <?php echo utils_requiredField(); ?></td><td><?php echo $release_box; ?></td></tr>
-	<tr><td><strong><?php echo _('Start date') ?></strong> <?php echo utils_requiredField(); ?></td><td><input type="text" name="start_date" value="<?php echo $start_date ?>"></td></tr>
-	<tr><td><strong><?php echo _('End date') ?></strong> <?php echo utils_requiredField(); ?></td><td><input type="text" name="end_date" value="<?php echo $end_date ?>"></td></tr>
-	<tr><td><strong><?php echo _('Goals') ?></strong></td><td><textarea name="goals" cols="79" rows="5" ><?php echo htmlspecialchars($goals) ?></textarea></td></tr>
-	<tr><td><strong><?php echo _('Page URL') ?></strong></td><td><input type="text" name="page_url" value="<?php echo htmlspecialchars($page_url) ?>"></td></tr>
+	<tr><td><strong><?php echo _('Start date') ?></strong> <?php echo utils_requiredField(); ?></td><td><input type="text" name="start_date" ></td></tr>
+	<tr><td><strong><?php echo _('End date') ?></strong> <?php echo utils_requiredField(); ?></td><td><input type="text" name="end_date" ></td></tr>
+	<tr><td><strong><?php echo _('Goals') ?></strong></td><td><textarea name="goals" cols="79" rows="5" ></textarea></td></tr>
+	<tr><td><strong><?php echo _('Page URL') ?></strong></td><td><input type="text" name="page_url" ></td></tr>
 <?php
 echo $HTML->listTableBottom();
 echo html_e('p', array(), html_e('input', array('type' => 'submit', 'name' => 'post_changes', 'value' => _('Submit'))));
 echo $HTML->closeForm();
 echo $HTML->addRequiredFieldsInfoBox();
+$date_format_js = _('yy-mm-dd');
 echo html_ao('script', array('type' => 'text/javascript'));
 ?>
 //<![CDATA[
 jQuery( document ).ready(function( $ ) {
-	$( "input[name='start_date'], input[name='end_date']" ).datepicker( {  "dateFormat" : "yy-mm-dd" });
+	$( "input[name='start_date'], input[name='end_date']" ).datepicker( {  "dateFormat" : "<?php echo $date_format_js ?>" });
 });
 //]]>
 <?php

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

Summary of changes:
 src/common/docman/views/listfile.php               |  8 ++--
 src/common/include/Navigation.class.php            | 14 ++++---
 .../common/views/releases/add_release.php          | 14 ++++---
 .../renderers/DocsAllHtmlSearchRenderer.class.php  | 47 +++++++++++++---------
 .../renderers/DocsHtmlSearchRenderer.class.php     |  2 +-
 5 files changed, 50 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list