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 d8c9d7f1d03e6e4e84711ab0a267971c9c208deb (commit)
from dc191376fea91cafd9c59218cd5554b94daaa560 (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=d8c9d7f1d03e6e4e84711ab0a267971c9c208deb
commit d8c9d7f1d03e6e4e84711ab0a267971c9c208deb
Author: Franck Villaume <[email protected]>
Date: Wed Feb 1 20:43:31 2017 +0100
document review fixes: wrong var actionns vs. actions, fix read-only
comments view, fix optional label, fix comment action when optional
diff --git a/src/common/docman/DocumentReview.class.php
b/src/common/docman/DocumentReview.class.php
index 8d83929..7753338 100644
--- a/src/common/docman/DocumentReview.class.php
+++ b/src/common/docman/DocumentReview.class.php
@@ -189,7 +189,7 @@ class DocumentReview extends FFError {
function getReadAction() {
global $HTML;
- return util_make_link('#', $HTML->getEditFilePic(_('View this
review'), 'viewreview'), array('id' => 'review_action_view', 'onclick' =>
'javascript:controllerListFile.viewReview({review: '.$this->getID().'})'),
true);
+ return util_make_link('#', $HTML->getEditFilePic(_('View
comments of this review'), 'viewreview'), array('id' => 'review_action_view',
'onclick' => 'javascript:controllerListFile.toggleCommentReviewView({review:
'.$this->getID().', groupId: '.$this->Document->Group->getID().', docid:
'.$this->Document->getID().'})'), true);
}
function getEditAction($edit = true) {
@@ -398,7 +398,7 @@ class DocumentReview extends FFError {
$cells = array();
$userObject = user_get_object($optionalUser['userid']);
$cells[][] =
util_display_user($userObject->getUnixName(), $userObject->getID(),
$userObject->getRealName());
- $cells[][] = _('mandatory');
+ $cells[][] = _('optional');
$cells[][] = $optionalUser['statusname'];
$return .= $HTML->multiTableRow(array(), $cells);
}
@@ -501,9 +501,9 @@ class DocumentReview extends FFError {
foreach ($users as $user) {
$userObject = user_get_object($user[1]);
if ($user[2] == 1) {
- $sub_label = "\n"._('Your review is
MANDATORY')."\n";
+ $sub_label = "\n\n"._('Your review is
MANDATORY')."\n";
} elseif ($user[2] == 2) {
- $sub_label = "\n"._('Your review is
optional')."\n";
+ $sub_label = "\n\n"._('Your review is
optional')."\n";
}
util_send_message($userObject->getEmail(),
$subject, $body.$sub_label.$body2, 'noreply@'.forge_get_config('web_host'), '',
_('Docman'));
}
diff --git a/src/common/docman/DocumentReviewFactory.class.php
b/src/common/docman/DocumentReviewFactory.class.php
index 10a65db..d1d6de1 100644
--- a/src/common/docman/DocumentReviewFactory.class.php
+++ b/src/common/docman/DocumentReviewFactory.class.php
@@ -102,14 +102,20 @@ class DocumentReviewFactory extends FFError {
if ($user->getID() ==
$dr->getCreatedBy()) {
$actions .=
$dr->getReminderAction().$dr->getEditAction().$dr->getCompleteAction();
}
- if (($dr->getStatusID() == 1) &&
(($user->getID() == $dr->getCreatedBy()) || in_array($user->getID(), $users))) {
+ $userfound = false;
+ foreach ($users as $ruser) {
+ if ($user->getID() ==
$ruser['userid']) {
+ $userfound = true;
+ }
+ }
+ if (($dr->getStatusID() == 1) &&
(($user->getID() == $dr->getCreatedBy()) || $userfound)) {
$actions .=
$dr->getCommentAction();
}
if ($user->getID() ==
$dr->getCreatedBy()) {
$actions .=
$dr->getDeleteAction();
}
} else {
- $actionns .= $dr->getReadAction();
+ $actions .= $dr->getReadAction();
}
$cells[][] = $actions;
diff --git a/src/common/docman/actions/getdocreviewcomments.php
b/src/common/docman/actions/getdocreviewcomments.php
index 6d3cd8a..296272b 100644
--- a/src/common/docman/actions/getdocreviewcomments.php
+++ b/src/common/docman/actions/getdocreviewcomments.php
@@ -2,7 +2,7 @@
/**
* FusionForge Documentation Manager
*
- * Copyright 2016, Franck Villaume - TrivialDev
+ * Copyright 2016,2017, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
@@ -41,7 +41,11 @@ if ($docid && $revid) {
if ($documentObject && !$documentObject->isError()) {
$dr = new DocumentReview($documentObject, $revid);
if ($dr && !$dr->isError()) {
- $result['html'] =
$dr->showCommentFormHTML().$dr->showCommentsHTML();
+ $result['html'] = '';
+ if ($dr->getStatusID() == 1) {
+ $result['html'] .= $dr->showCommentFormHTML();
+ }
+ $result['html'] .= $dr->showCommentsHTML();
} else {
$result['html'] = $HTML->warning_msg(_('Cannot retrieve
review')._(': ').$revid);
}
-----------------------------------------------------------------------
Summary of changes:
src/common/docman/DocumentReview.class.php | 8 ++++----
src/common/docman/DocumentReviewFactory.class.php | 10 ++++++++--
src/common/docman/actions/getdocreviewcomments.php | 8 ++++++--
3 files changed, 18 insertions(+), 8 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits