View | Details | Raw Unified | Return to bug 3293 | Differences between
and this patch

Collapse All | Expand All

(-)ocs2/classes/comment/form/CommentForm.inc.php:1.10 (-7 / +9 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * Form to change metadata information for an RT comment.
12
 * Form to change metadata information for an RT comment.
13
 *
13
 *
14
 * $Id: CommentForm.inc.php,v 1.10 2008/04/04 17:06:45 asmecher Exp $
14
 * $Id: CommentForm.inc.php,v 1.11 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
import('form.Form');
17
import('form.Form');
 Lines 90-95    Link Here 
90
	 * Display the form.
90
	 * Display the form.
91
	 */
91
	 */
92
	function display() {
92
	function display() {
93
		$conference = Request::getConference();
93
		$schedConf = Request::getSchedConf();
94
		$schedConf = Request::getSchedConf();
94
95
95
		$templateMgr = &TemplateManager::getManager();
96
		$templateMgr = &TemplateManager::getManager();
 Lines 122-130    Link Here 
122
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
123
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
123
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
124
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
124
		$templateMgr->assign('commentsClosed', $commentsClosed);
125
		$templateMgr->assign('commentsClosed', $commentsClosed);
125
		$templateMgr->assign('enableComments', $schedConf->getSetting('enableComments', true));
126
		$templateMgr->assign('enableComments', $conference->getSetting('enableComments'));
126
		$templateMgr->assign('commentsRequireRegistration', $schedConf->getSetting('commentsRequireRegistration', true));
127
		$templateMgr->assign('commentsRequireRegistration', $conference->getSetting('commentsRequireRegistration'));
127
		$templateMgr->assign('commentsAllowAnonymous', $schedConf->getSetting('commentsAllowAnonymous', true));
128
		$templateMgr->assign('commentsAllowAnonymous', $conference->getSetting('commentsAllowAnonymous'));
128
129
129
		parent::display();
130
		parent::display();
130
	}
131
	}
 Lines 153-162    Link Here 
153
	 * @return int the comment ID
154
	 * @return int the comment ID
154
	 */
155
	 */
155
	function execute() {
156
	function execute() {
157
		$conference = &Request::getConference();
156
		$schedConf = &Request::getSchedConf();
158
		$schedConf = &Request::getSchedConf();
157
		$enableComments = $schedConf->getSetting('enableComments', true);
159
		$enableComments = $conference->getSetting('enableComments');
158
		$commentsRequireRegistration = $schedConf->getSetting('commentsRequireRegistration', true);
160
		$commentsRequireRegistration = $conference->getSetting('commentsRequireRegistration');
159
		$commentsAllowAnonymous = $schedConf->getSetting('commentsAllowAnonymous', true);
161
		$commentsAllowAnonymous = $conference->getSetting('commentsAllowAnonymous');
160
162
161
		$commentDao = &DAORegistry::getDAO('CommentDAO');
163
		$commentDao = &DAORegistry::getDAO('CommentDAO');
162
164
(-)ocs2/classes/conference/Track.inc.php:1.11 (-1 / +17 lines)
 Lines 12-18    Link Here 
12
 * Track class.
12
 * Track class.
13
 * Describes basic track properties.
13
 * Describes basic track properties.
14
 *
14
 *
15
 * $Id: Track.inc.php,v 1.11 2008/04/04 17:06:45 asmecher Exp $
15
 * $Id: Track.inc.php,v 1.12 2008/06/30 18:35:51 michael Exp $
16
 */
16
 */
17
17
18
class Track extends DataObject {
18
class Track extends DataObject {
 Lines 202-207    Link Here 
202
	}
202
	}
203
203
204
	/**
204
	/**
205
	 * Return boolean indicating if RT comments should be disabled.
206
	 * @return boolean
207
	 */
208
	function getDisableComments() {
209
		return $this->getData('disableComments');
210
	}
211
212
	/**
213
	 * Set if RT comments should be disabled.
214
	 * @param $disableComments boolean
215
	 */
216
	function setDisableComments($disableComments) {
217
		return $this->setData('disableComments', $disableComments);
218
	}
219
220
	/**
205
	 * Get localized track policy.
221
	 * Get localized track policy.
206
	 * @return string
222
	 * @return string
207
	 */
223
	 */
(-)ocs2/classes/conference/TrackDAO.inc.php:1.18 (-5 / +9 lines)
 Lines 12-18    Link Here 
12
 * Class for track DAO.
12
 * Class for track DAO.
13
 * Operations for retrieving and modifying Track objects.
13
 * Operations for retrieving and modifying Track objects.
14
 *
14
 *
15
 * $Id: TrackDAO.inc.php,v 1.18 2008/05/06 18:22:12 asmecher Exp $
15
 * $Id: TrackDAO.inc.php,v 1.19 2008/06/30 18:35:51 michael Exp $
16
 */
16
 */
17
17
18
import ('conference.Track');
18
import ('conference.Track');
 Lines 145-150    Link Here 
145
		$track->setMetaReviewed($row['meta_reviewed']);
145
		$track->setMetaReviewed($row['meta_reviewed']);
146
		$track->setDirectorRestricted($row['director_restricted']);
146
		$track->setDirectorRestricted($row['director_restricted']);
147
		$track->setHideAbout($row['hide_about']);
147
		$track->setHideAbout($row['hide_about']);
148
		$track->setDisableComments($row['disable_comments']);
148
149
149
		$this->getDataObjectSettings('track_settings', 'track_id', $row['track_id'], $track);
150
		$this->getDataObjectSettings('track_settings', 'track_id', $row['track_id'], $track);
150
151
 Lines 179-193    Link Here 
179
	function insertTrack(&$track) {
180
	function insertTrack(&$track) {
180
		$this->update(
181
		$this->update(
181
			'INSERT INTO tracks
182
			'INSERT INTO tracks
182
				(sched_conf_id, seq, meta_reviewed, director_restricted, hide_about)
183
				(sched_conf_id, seq, meta_reviewed, director_restricted, hide_about, disable_comments)
183
				VALUES
184
				VALUES
184
				(?, ?, ?, ?, ?)',
185
				(?, ?, ?, ?, ?, ?)',
185
			array(
186
			array(
186
				$track->getSchedConfId(),
187
				$track->getSchedConfId(),
187
				$track->getSequence() == null ? 0 : $track->getSequence(),
188
				$track->getSequence() == null ? 0 : $track->getSequence(),
188
				$track->getMetaReviewed() ? 1 : 0,
189
				$track->getMetaReviewed() ? 1 : 0,
189
				$track->getDirectorRestricted() ? 1 : 0,
190
				$track->getDirectorRestricted() ? 1 : 0,
190
				$track->getHideAbout() ? 1 : 0
191
				$track->getHideAbout() ? 1 : 0,
192
				$track->getDisableComments() ? 1 : 0
191
			)
193
			)
192
		);
194
		);
193
195
 Lines 207-219    Link Here 
207
					seq = ?,
209
					seq = ?,
208
					meta_reviewed = ?,
210
					meta_reviewed = ?,
209
					director_restricted = ?,
211
					director_restricted = ?,
210
					hide_about = ?
212
					hide_about = ?,
213
					disable_comments = ?
211
				WHERE track_id = ?',
214
				WHERE track_id = ?',
212
			array(
215
			array(
213
				$track->getSequence(),
216
				$track->getSequence(),
214
				$track->getMetaReviewed(),
217
				$track->getMetaReviewed(),
215
				$track->getDirectorRestricted(),
218
				$track->getDirectorRestricted(),
216
				$track->getHideAbout(),
219
				$track->getHideAbout(),
220
				$track->getDisableComments(),
217
				$track->getTrackId()
221
				$track->getTrackId()
218
			)
222
			)
219
		);
223
		);
(-)ocs2/classes/manager/form/TrackForm.inc.php:1.14 (-4 / +8 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * Form for creating and modifying scheduled conference tracks.
12
 * Form for creating and modifying scheduled conference tracks.
13
 *
13
 *
14
 * $Id: TrackForm.inc.php,v 1.14 2008/05/23 16:34:14 asmecher Exp $
14
 * $Id: TrackForm.inc.php,v 1.15 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
import('form.Form');
17
import('form.Form');
 Lines 49-54    Link Here 
49
	 * Display the form.
49
	 * Display the form.
50
	 */
50
	 */
51
	function display() {
51
	function display() {
52
		$conference = &Request::getConference();
53
		$schedConf = &Request::getSchedConf();
52
		$templateMgr = &TemplateManager::getManager();
54
		$templateMgr = &TemplateManager::getManager();
53
		$templateMgr->assign('trackId', $this->trackId);
55
		$templateMgr->assign('trackId', $this->trackId);
54
56
 Lines 76-82    Link Here 
76
			}
78
			}
77
79
78
		} else {
80
		} else {
79
			$schedConf = &Request::getSchedConf();
80
			$trackDirectorsDao = &DAORegistry::getDAO('TrackDirectorsDAO');
81
			$trackDirectorsDao = &DAORegistry::getDAO('TrackDirectorsDAO');
81
82
82
			// Get track directors not assigned to this track
83
			// Get track directors not assigned to this track
 Lines 88-93    Link Here 
88
89
89
		$templateMgr->assign('unassignedDirectors', $unassignedDirectors);
90
		$templateMgr->assign('unassignedDirectors', $unassignedDirectors);
90
		$templateMgr->assign('assignedDirectors', $assignedDirectors);
91
		$templateMgr->assign('assignedDirectors', $assignedDirectors);
92
		$templateMgr->assign('commentsEnabled', $conference->getSetting('enableComments'));
91
		$templateMgr->assign('helpTopicId','conference.currentConferences.tracks');
93
		$templateMgr->assign('helpTopicId','conference.currentConferences.tracks');
92
94
93
		parent::display();
95
		parent::display();
 Lines 111-117    Link Here 
111
					'identifyType' => $track->getIdentifyType(null), // Localized
113
					'identifyType' => $track->getIdentifyType(null), // Localized
112
					'directorRestriction' => $track->getDirectorRestricted(),
114
					'directorRestriction' => $track->getDirectorRestricted(),
113
					'policy' => $track->getPolicy(null), // Localized
115
					'policy' => $track->getPolicy(null), // Localized
114
					'hideAbout' => $track->getHideAbout()
116
					'hideAbout' => $track->getHideAbout(),
117
					'disableComments' => $track->getDisableComments(),
115
				);
118
				);
116
			}
119
			}
117
		}
120
		}
 Lines 121-127    Link Here 
121
	 * Assign form data to user-submitted data.
124
	 * Assign form data to user-submitted data.
122
	 */
125
	 */
123
	function readInputData() {
126
	function readInputData() {
124
		$this->readUserVars(array('title', 'abbrev', 'metaNotReviewed', 'identifyType', 'directorRestriction', 'policy', 'hideAbout'));
127
		$this->readUserVars(array('title', 'abbrev', 'metaNotReviewed', 'identifyType', 'directorRestriction', 'policy', 'hideAbout', 'disableComments'));
125
	}
128
	}
126
129
127
	/**
130
	/**
 Lines 149-154    Link Here 
149
		$track->setDirectorRestricted($this->getData('directorRestriction') ? 1 : 0);
152
		$track->setDirectorRestricted($this->getData('directorRestriction') ? 1 : 0);
150
		$track->setPolicy($this->getData('policy'), null); // Localized
153
		$track->setPolicy($this->getData('policy'), null); // Localized
151
		$track->setHideAbout($this->getData('hideAbout'));
154
		$track->setHideAbout($this->getData('hideAbout'));
155
		$track->setDisableComments($this->getData('disableComments') ? 1 : 0);
152
156
153
		if ($track->getTrackId() != null) {
157
		if ($track->getTrackId() != null) {
154
			$trackDao->updateTrack($track);
158
			$trackDao->updateTrack($track);
(-)ocs2/classes/paper/Paper.inc.php:1.20 (-1 / +73 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * Paper class.
12
 * Paper class.
13
 *
13
 *
14
 * $Id: Paper.inc.php,v 1.20 2008/06/17 23:26:00 asmecher Exp $
14
 * $Id: Paper.inc.php,v 1.21 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
// Submission status constants
17
// Submission status constants
 Lines 41-46    Link Here 
41
41
42
define('SUBMISSION_FIELD_DATE_SUBMITTED', 5);
42
define('SUBMISSION_FIELD_DATE_SUBMITTED', 5);
43
43
44
// Paper RT comments
45
define ('COMMENTS_TRACK_DEFAULT', 0);
46
define ('COMMENTS_DISABLE', 1);
47
define ('COMMENTS_ENABLE', 2);
48
44
class Paper extends DataObject {
49
class Paper extends DataObject {
45
50
46
	/** @var array Presenters of this paper */
51
	/** @var array Presenters of this paper */
 Lines 913-918    Link Here 
913
	function setPages($pages) {
918
	function setPages($pages) {
914
		return $this->setData('pages',$pages);
919
		return $this->setData('pages',$pages);
915
	}		
920
	}		
921
922
	/**
923
	 * Return paper RT comments status.
924
	 * @return int 
925
	 */
926
	function getCommentsStatus() {
927
		return $this->getData('commentsStatus');
928
	}
929
930
	/**
931
	 * Set paper RT comments status.
932
	 * @param $commentsStatus boolean
933
	 */
934
	function setCommentsStatus($commentsStatus) {
935
		return $this->setData('commentsStatus', $commentsStatus);
936
	}
937
938
	/**
939
	 * Return locale string corresponding to RT comments status.
940
	 * @return string
941
	 */
942
	function getCommentsStatusString() {
943
		switch ($this->getCommentsStatus()) {
944
			case COMMENTS_DISABLE:
945
				return 'paper.comments.disable';
946
			case COMMENTS_ENABLE:
947
				return 'paper.comments.enable';
948
			default:
949
				return 'paper.comments.trackDefault';
950
		}
951
	}
952
953
	/**
954
	 * Return boolean indicating if paper RT comments should be enabled.
955
	 * Checks both the track and paper comments status. Paper status
956
	 * overrides track status.
957
	 * @return int 
958
	 */
959
	function getEnableComments() {
960
		switch ($this->getCommentsStatus()) {
961
			case COMMENTS_DISABLE:
962
				return false;
963
			case COMMENTS_ENABLE:
964
				return true;
965
			case COMMENTS_TRACK_DEFAULT:
966
				$trackDao =& DAORegistry::getDAO('TrackDAO');
967
				$track =& $trackDao->getTrack($this->getTrackId(), $this->getSchedConfId());
968
				if ($track->getDisableComments()) {
969
					return false;
970
				} else {
971
					return true;
972
				}
973
		}
974
	}
975
976
	/**
977
	 * Get an associative array matching RT comments status codes with locale strings.
978
	 * @return array comments status => localeString
979
	 */
980
	function &getCommentsStatusOptions() {
981
		static $commentsStatusOptions = array(
982
			COMMENTS_TRACK_DEFAULT => 'paper.comments.trackDefault',
983
			COMMENTS_DISABLE => 'paper.comments.disable',
984
			COMMENTS_ENABLE => 'paper.comments.enable'
985
		);
986
		return $commentsStatusOptions;
987
	}
916
}
988
}
917
989
918
?>
990
?>
(-)ocs2/classes/paper/PaperDAO.inc.php:1.25 (-5 / +10 lines)
 Lines 12-18    Link Here 
12
 * Class for Paper DAO.
12
 * Class for Paper DAO.
13
 * Operations for retrieving and modifying Paper objects.
13
 * Operations for retrieving and modifying Paper objects.
14
 *
14
 *
15
 * $Id: PaperDAO.inc.php,v 1.25 2008/04/16 15:33:07 asmecher Exp $
15
 * $Id: PaperDAO.inc.php,v 1.26 2008/06/30 18:35:51 michael Exp $
16
 */
16
 */
17
17
18
import('paper.Paper');
18
import('paper.Paper');
 Lines 140-145    Link Here 
140
		$paper->setLayoutFileId($row['layout_file_id']);
140
		$paper->setLayoutFileId($row['layout_file_id']);
141
		$paper->setDirectorFileId($row['director_file_id']);
141
		$paper->setDirectorFileId($row['director_file_id']);
142
		$paper->setPages($row['pages']);
142
		$paper->setPages($row['pages']);
143
		$paper->setCommentsStatus($row['comments_status']);
143
144
144
		$paper->setPresenters($this->presenterDao->getPresentersByPaper($row['paper_id']));
145
		$paper->setPresenters($this->presenterDao->getPresentersByPaper($row['paper_id']));
145
146
 Lines 180-188    Link Here 
180
				 review_file_id,
181
				 review_file_id,
181
				 layout_file_id,
182
				 layout_file_id,
182
				 director_file_id,
183
				 director_file_id,
183
				 pages)
184
				 pages,
185
				 comments_status)
184
				VALUES
186
				VALUES
185
				(?, ?, ?, ?, ?, ?, %s, %s, %s, %s, %s, %s, %s, %s, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
187
				(?, ?, ?, ?, ?, ?, %s, %s, %s, %s, %s, %s, %s, %s, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
186
				$this->datetimeToDB($paper->getDateSubmitted()), $this->datetimeToDB($paper->getDateStatusModified()), $this->datetimeToDB($paper->getLastModified()), $this->datetimeToDB($paper->getDateReminded()), $this->datetimeToDB($paper->getStartTime()), $this->datetimeToDB($paper->getEndTime()), $this->datetimeToDB($paper->getDateToPresentations()), $this->datetimeToDB($paper->getDateToArchive())),
188
				$this->datetimeToDB($paper->getDateSubmitted()), $this->datetimeToDB($paper->getDateStatusModified()), $this->datetimeToDB($paper->getLastModified()), $this->datetimeToDB($paper->getDateReminded()), $this->datetimeToDB($paper->getStartTime()), $this->datetimeToDB($paper->getEndTime()), $this->datetimeToDB($paper->getDateToPresentations()), $this->datetimeToDB($paper->getDateToArchive())),
187
			array(
189
			array(
188
				$paper->getUserId(),
190
				$paper->getUserId(),
 Lines 200-206    Link Here 
200
				$paper->getReviewFileId(),
202
				$paper->getReviewFileId(),
201
				$paper->getLayoutFileId(),
203
				$paper->getLayoutFileId(),
202
				$paper->getDirectorFileId(),
204
				$paper->getDirectorFileId(),
203
				$paper->getPages()
205
				$paper->getPages(),
206
				$paper->getCommentsStatus() === null ? 0 : $paper->getCommentsStatus()
204
			)
207
			)
205
		);
208
		);
206
209
 Lines 248-254    Link Here 
248
					review_file_id = ?,
251
					review_file_id = ?,
249
					layout_file_id = ?,
252
					layout_file_id = ?,
250
					director_file_id = ?,
253
					director_file_id = ?,
251
					pages = ?
254
					pages = ?,
255
					comments_status = ?
252
				WHERE paper_id = ?',
256
				WHERE paper_id = ?',
253
				$this->datetimeToDB($paper->getDateSubmitted()), $this->datetimeToDB($paper->getDateStatusModified()), $this->datetimeToDB($paper->getLastModified()), $this->datetimeToDB($paper->getDateReminded()), $this->datetimeToDB($paper->getStartTime()), $this->datetimeToDB($paper->getEndTime()), $this->datetimeToDB($paper->getDateToPresentations()), $this->datetimeToDB($paper->getDateToArchive())),
257
				$this->datetimeToDB($paper->getDateSubmitted()), $this->datetimeToDB($paper->getDateStatusModified()), $this->datetimeToDB($paper->getLastModified()), $this->datetimeToDB($paper->getDateReminded()), $this->datetimeToDB($paper->getStartTime()), $this->datetimeToDB($paper->getEndTime()), $this->datetimeToDB($paper->getDateToPresentations()), $this->datetimeToDB($paper->getDateToArchive())),
254
			array(
258
			array(
 Lines 267-272    Link Here 
267
				$paper->getLayoutFileId(),
271
				$paper->getLayoutFileId(),
268
				$paper->getDirectorFileId(),
272
				$paper->getDirectorFileId(),
269
				$paper->getPages(),
273
				$paper->getPages(),
274
				$paper->getCommentsStatus(),
270
				$paper->getPaperId()
275
				$paper->getPaperId()
271
			)
276
			)
272
		);
277
		);
(-)ocs2/classes/submission/trackDirector/TrackDirectorAction.inc.php:1.43 (-1 / +14 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * TrackDirectorAction class.
12
 * TrackDirectorAction class.
13
 *
13
 *
14
 * $Id: TrackDirectorAction.inc.php,v 1.43 2008/05/21 23:48:29 asmecher Exp $
14
 * $Id: TrackDirectorAction.inc.php,v 1.44 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
import('submission.common.Action');
17
import('submission.common.Action');
 Lines 1553-1558    Link Here 
1553
	}
1553
	}
1554
1554
1555
	/**
1555
	/**
1556
	 * Changes the submission RT comments status.
1557
	 * @param $submission object
1558
	 * @param $commentsStatus int
1559
	 */
1560
	function updateCommentsStatus($submission, $commentsStatus) {
1561
		if (HookRegistry::call('TrackDirectorAction::updateCommentsStatus', array(&$submission, &$commentsStatus))) return;
1562
1563
		$submissionDao = &DAORegistry::getDAO('TrackDirectorSubmissionDAO');
1564
		$submission->setCommentsStatus($commentsStatus); // FIXME validate this?
1565
		$submissionDao->updateTrackDirectorSubmission($submission);
1566
	}
1567
1568
	/**
1556
	 * Helper method for building submission breadcrumb
1569
	 * Helper method for building submission breadcrumb
1557
	 * @param $paperId
1570
	 * @param $paperId
1558
	 * @param $parentPage name of submission component
1571
	 * @param $parentPage name of submission component
(-)ocs2/classes/submission/trackDirector/TrackDirectorSubmissionDAO.inc.php:1.18 (-1 / +2 lines)
 Lines 12-18    Link Here 
12
 * Class for TrackDirectorSubmission DAO.
12
 * Class for TrackDirectorSubmission DAO.
13
 * Operations for retrieving and modifying TrackDirectorSubmission objects.
13
 * Operations for retrieving and modifying TrackDirectorSubmission objects.
14
 *
14
 *
15
 * $Id: TrackDirectorSubmissionDAO.inc.php,v 1.18 2008/06/23 22:22:59 asmecher Exp $
15
 * $Id: TrackDirectorSubmissionDAO.inc.php,v 1.19 2008/06/30 18:35:51 michael Exp $
16
 */
16
 */
17
17
18
import('submission.trackDirector.TrackDirectorSubmission');
18
import('submission.trackDirector.TrackDirectorSubmission');
 Lines 243-248    Link Here 
243
			$paper->setDateToPresentations($trackDirectorSubmission->getDateToPresentations());
243
			$paper->setDateToPresentations($trackDirectorSubmission->getDateToPresentations());
244
			$paper->setDateToArchive($trackDirectorSubmission->getDateToArchive());
244
			$paper->setDateToArchive($trackDirectorSubmission->getDateToArchive());
245
			$paper->setLastModified($trackDirectorSubmission->getLastModified());
245
			$paper->setLastModified($trackDirectorSubmission->getLastModified());
246
			$paper->setCommentsStatus($trackDirectorSubmission->getCommentsStatus());
246
247
247
			$this->paperDao->updatePaper($paper);
248
			$this->paperDao->updatePaper($paper);
248
		}
249
		}
(-)ocs2/dbscripts/xml/ocs_schema.xml:1.56 (-1 / +9 lines)
 Lines 9-15    Link Here 
9
  *
9
  *
10
  * OCS database schema in XML.
10
  * OCS database schema in XML.
11
  *
11
  *
12
  * $Id: ocs_schema.xml,v 1.56 2008/06/25 00:46:59 michael Exp $
12
  * $Id: ocs_schema.xml,v 1.57 2008/06/30 18:35:51 michael Exp $
13
  -->
13
  -->
14
14
15
<schema version="0.2">
15
<schema version="0.2">
 Lines 584-589    Link Here 
584
			<NOTNULL/>
584
			<NOTNULL/>
585
			<DEFAULT VALUE="0"/>
585
			<DEFAULT VALUE="0"/>
586
		</field>
586
		</field>
587
		<field name="disable_comments" type="I1">
588
			<NOTNULL/>
589
			<DEFAULT VALUE="0"/>
590
		</field>
587
		<descr>Scheduled conference tracks.</descr>
591
		<descr>Scheduled conference tracks.</descr>
588
		<index name="tracks_sched_conf_id">
592
		<index name="tracks_sched_conf_id">
589
			<col>sched_conf_id</col>
593
			<col>sched_conf_id</col>
 Lines 723-728    Link Here 
723
		<field name="pages" type="C2" size="255"/>
727
		<field name="pages" type="C2" size="255"/>
724
		<field name="date_to_presentations" type="T"/>
728
		<field name="date_to_presentations" type="T"/>
725
		<field name="date_to_archive" type="T"/>
729
		<field name="date_to_archive" type="T"/>
730
		<field name="comments_status" type="I1">
731
			<NOTNULL/>
732
			<DEFAULT VALUE="0"/>
733
		</field>
726
		<descr>Conference papers.</descr>
734
		<descr>Conference papers.</descr>
727
		<index name="papers_user_id">
735
		<index name="papers_user_id">
728
			<col>user_id</col>
736
			<col>user_id</col>
(-)ocs2/dbscripts/xml/upgrade/2.1.1_update.xml:1.1 (-1 / +20 lines)
 Lines 9-15    Link Here 
9
  *
9
  *
10
  * 2.1.1 database updates XML file.
10
  * 2.1.1 database updates XML file.
11
  *
11
  *
12
  * $Id: 2.1.1_update.xml,v 1.1 2008/06/25 00:46:59 michael Exp $
12
  * $Id: 2.1.1_update.xml,v 1.2 2008/06/30 18:35:51 michael Exp $
13
  -->
13
  -->
14
14
15
<data>
15
<data>
 Lines 43-46    Link Here 
43
			CREATE UNIQUE INDEX user_settings_pkey ON user_settings (user_id, locale, setting_name, conference_id)
43
			CREATE UNIQUE INDEX user_settings_pkey ON user_settings (user_id, locale, setting_name, conference_id)
44
		</query>
44
		</query>
45
	</sql>
45
	</sql>
46
47
	<!-- Bug #3293: Enable user comments on a per track/paper basis -->
48
	<sql>
49
		<!-- Syntax for MySQL. -->
50
		<query driver="mysql">
51
			ALTER TABLE tracks ADD COLUMN disable_comments TINYINT NOT NULL DEFAULT 0
52
		</query>
53
		<query driver="mysql">
54
			ALTER TABLE papers ADD COLUMN comments_status TINYINT NOT NULL DEFAULT 0
55
		</query>
56
57
		<!-- Syntax for PostgreSQL. -->
58
		<query driver="postgres7">
59
			ALTER TABLE tracks ADD COLUMN disable_comments SMALLINT NOT NULL DEFAULT 0
60
		</query>
61
		<query driver="postgres7">
62
			ALTER TABLE papers ADD COLUMN comments_status SMALLINT NOT NULL DEFAULT 0
63
		</query>
64
	</sql>
46
</data>
65
</data>
(-)ocs2/locale/en_US/locale.xml:1.212 (-3 / +8 lines)
 Lines 9-15    Link Here 
9
  *
9
  *
10
  * Localization strings for the en_US (U.S. English) locale.
10
  * Localization strings for the en_US (U.S. English) locale.
11
  *
11
  *
12
  * $Id: locale.xml,v 1.212 2008/06/27 22:05:34 michael Exp $
12
  * $Id: locale.xml,v 1.213 2008/06/30 18:35:51 michael Exp $
13
  -->
13
  -->
14
14
15
<locale name="en_US" full_name="U.S. English">
15
<locale name="en_US" full_name="U.S. English">
 Lines 310-315    Link Here 
310
	<message key="paper.details">Details</message>
310
	<message key="paper.details">Details</message>
311
	<message key="paper.location">Location</message>
311
	<message key="paper.location">Location</message>
312
	<message key="paper.time">Time</message>
312
	<message key="paper.time">Time</message>
313
	<message key="paper.comments.trackDefault">Default</message>
314
	<message key="paper.comments.disable">Disable</message>
315
	<message key="paper.comments.enable">Enable</message>
313
316
314
	<!-- Submission Tracking - Common -->
317
	<!-- Submission Tracking - Common -->
315
	<message key="submission.fromTime">From</message>
318
	<message key="submission.fromTime">From</message>
 Lines 335-340    Link Here 
335
	<message key="submission.addSuppFile">Add a Supplementary File</message>
338
	<message key="submission.addSuppFile">Add a Supplementary File</message>
336
	<message key="submission.submitter">Submitter</message>
339
	<message key="submission.submitter">Submitter</message>
337
	<message key="submission.changeTrack">Change to</message>
340
	<message key="submission.changeTrack">Change to</message>
341
	<message key="submission.changeComments">Change to</message>
338
	<message key="submission.initiated">Initiated</message>
342
	<message key="submission.initiated">Initiated</message>
339
	<message key="submission.lastModified">Last modified</message>
343
	<message key="submission.lastModified">Last modified</message>
340
	<message key="submission.ask">Ask</message>
344
	<message key="submission.ask">Ask</message>
 Lines 1084-1090    Link Here 
1084
	<message key="manager.setup.aboutConference.copyrightNoticeAgree">Require authors to agree to Copyright Notice as part of the submission process.</message>
1088
	<message key="manager.setup.aboutConference.copyrightNoticeAgree">Require authors to agree to Copyright Notice as part of the submission process.</message>
1085
	<message key="manager.setup.aboutConference.postCreativeCommons">Post the Creative Commons license logo on the conference website.</message>
1089
	<message key="manager.setup.aboutConference.postCreativeCommons">Post the Creative Commons license logo on the conference website.</message>
1086
	<message key="manager.setup.aboutConference.archiveAccessPolicy">Archive Access Policy</message>
1090
	<message key="manager.setup.aboutConference.archiveAccessPolicy">Archive Access Policy</message>
1087
	<message key="manager.setup.aboutConference.archiveAccessPolicy.description">The following settings control access to the conference archives. See section 2.4 for additional settings.</message>
1091
	<message key="manager.setup.aboutConference.archiveAccessPolicy.description">The following settings control access to the conference archives. See section 2.5 for additional settings.</message>
1088
	<message key="manager.setup.aboutConference.privacyStatement">Privacy Statement</message>
1092
	<message key="manager.setup.aboutConference.privacyStatement">Privacy Statement</message>
1089
1093
1090
	<message key="manager.setup.aboutConference.addItemtoAboutConference">Add Item to Appear in "About the Conference"</message>
1094
	<message key="manager.setup.aboutConference.addItemtoAboutConference">Add Item to Appear in "About the Conference"</message>
 Lines 1331-1336    Link Here 
1331
	<message key="manager.tracks.peerReviewed">Peer Reviewed</message>
1335
	<message key="manager.tracks.peerReviewed">Peer Reviewed</message>
1332
	<message key="manager.tracks.directorRestriction">Items can only be submitted by Directors and Track Directors.</message>
1336
	<message key="manager.tracks.directorRestriction">Items can only be submitted by Directors and Track Directors.</message>
1333
	<message key="manager.tracks.hideAbout">Omit this track from Track Policies</message>
1337
	<message key="manager.tracks.hideAbout">Omit this track from Track Policies</message>
1338
	<message key="manager.tracks.disableComments">Disable reader comments for this track.</message>
1334
	<message key="manager.tracks.readingTools">Reading Tools</message>
1339
	<message key="manager.tracks.readingTools">Reading Tools</message>
1335
	<message key="manager.tracks.indexed">Indexed</message>
1340
	<message key="manager.tracks.indexed">Indexed</message>
1336
	<message key="manager.tracks.open">Open Submissions</message>
1341
	<message key="manager.tracks.open">Open Submissions</message>
 Lines 2467-2473    Link Here 
2467
	<message key="rt.admin.settings.printerFriendly">Print version (provides a printer-friendly version of an item).</message>
2472
	<message key="rt.admin.settings.printerFriendly">Print version (provides a printer-friendly version of an item).</message>
2468
	<message key="rt.admin.settings.presenterBio">About the author (displays the bio statements entered by the author).</message>
2473
	<message key="rt.admin.settings.presenterBio">About the author (displays the bio statements entered by the author).</message>
2469
	<message key="rt.admin.settings.defineTerms">Look up terms (enables readers to double-click on any word in an item and send the word to a dictionary).</message>
2474
	<message key="rt.admin.settings.defineTerms">Look up terms (enables readers to double-click on any word in an item and send the word to a dictionary).</message>
2470
	<message key="rt.admin.settings.addComment">Add comment (enables readers to post comments, which Conference Directors can delete. Reader Comments must be enabled in Setup, step 2).</message>
2475
	<message key="rt.admin.settings.addComment">Add comment (enables readers to post comments, which Conference Directors can delete). Reader Comments must be enabled in Website Management, section 1.5).</message>
2471
	<message key="rt.admin.settings.emailPresenter">Email the author (leads to an email template with author's email).</message>
2476
	<message key="rt.admin.settings.emailPresenter">Email the author (leads to an email template with author's email).</message>
2472
	<message key="rt.admin.settings.emailOthers">Notify a colleague (leads to an email template with link to item).</message>
2477
	<message key="rt.admin.settings.emailOthers">Notify a colleague (leads to an email template with link to item).</message>
2473
	<message key="rt.admin.settings.findingReferences">Find References</message>
2478
	<message key="rt.admin.settings.findingReferences">Find References</message>
(-)ocs2/pages/comment/CommentHandler.inc.php:1.17 (-23 / +28 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * Handle requests for user comments.
12
 * Handle requests for user comments.
13
 *
13
 *
14
 * $Id: CommentHandler.inc.php,v 1.17 2008/04/04 17:06:49 asmecher Exp $
14
 * $Id: CommentHandler.inc.php,v 1.18 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
import('rt.ocs.RTDAO');
17
import('rt.ocs.RTDAO');
 Lines 48-58    Link Here 
48
		$templateMgr->assign_by_ref('comments', $comments);
48
		$templateMgr->assign_by_ref('comments', $comments);
49
		$templateMgr->assign('paperId', $paperId);
49
		$templateMgr->assign('paperId', $paperId);
50
		$templateMgr->assign('galleyId', $galleyId);
50
		$templateMgr->assign('galleyId', $galleyId);
51
		$templateMgr->assign('enableComments', $schedConf->getSetting('enableComments', true));
51
		$templateMgr->assign('enableComments', $conference->getSetting('enableComments'));
52
		$templateMgr->assign('commentsRequireRegistration', $schedConf->getSetting('commentsRequireRegistration', true));
52
		$templateMgr->assign('commentsRequireRegistration', $conference->getSetting('commentsRequireRegistration'));
53
		$templateMgr->assign('commentsAllowAnonymous', $schedConf->getSetting('commentsAllowAnonymous', true));
53
		$templateMgr->assign('commentsAllowAnonymous', $conference->getSetting('commentsAllowAnonymous'));
54
54
		$closeCommentsDate = $schedConf->getSetting('closeCommentsDate');
55
		$closeCommentsDate = $schedConf->getSetting('closeCommentsDate');
55
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
56
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
57
56
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
58
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
57
		$templateMgr->assign('commentsClosed', $commentsClosed);
59
		$templateMgr->assign('commentsClosed', $commentsClosed);
58
		$templateMgr->assign('isManager', $isManager);
60
		$templateMgr->assign('isManager', $isManager);
 Lines 70-78    Link Here 
70
		// Bring in comment constants
72
		// Bring in comment constants
71
		$commentDao = &DAORegistry::getDAO('CommentDAO');
73
		$commentDao = &DAORegistry::getDAO('CommentDAO');
72
74
73
		$enableComments = $schedConf->getSetting('enableComments', true) && (!$schedConf->getSetting('closeComments') || (strtotime($schedConf->getSetting('closeCommentsDate') > time())));
75
		$enableComments = $conference->getSetting('enableComments');
74
		$commentsRequireRegistration = $schedConf->getSetting('commentsRequireRegistration', true);
76
		$commentsRequireRegistration = $conference->getSetting('commentsRequireRegistration');
75
		$commentsAllowAnonymous = $schedConf->getSetting('commentsAllowAnonymous', true);
77
		$commentsAllowAnonymous = $conference->getSetting('commentsAllowAnonymous');
78
79
		$closeCommentsDate = $schedConf->getSetting('closeCommentsDate');
80
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
81
82
		$enableComments = $enableComments && !$commentsClosed && $paper->getEnableComments();
76
83
77
		if (!$enableComments) Request::redirect(null, null, 'index');
84
		if (!$enableComments) Request::redirect(null, null, 'index');
78
		if ($commentsRequireRegistration && !Request::getUser()) Validation::redirectLogin();
85
		if ($commentsRequireRegistration && !Request::getUser()) Validation::redirectLogin();
 Lines 125-153    Link Here 
125
	 */
132
	 */
126
	function validate($paperId) {
133
	function validate($paperId) {
127
134
128
		parent::validate();
135
		list($conference, $schedConf) = parent::validate(true, true);
129
130
		$conference = &Request::getConference();
131
		$schedConf = &Request::getSchedConf();
132
136
133
		// Bring in comment constants
137
		$publishedPaperDao = &DAORegistry::getDAO('PublishedPaperDAO');
134
		$commentDao = &DAORegistry::getDAO('CommentDAO');
138
		$paper = &$publishedPaperDao->getPublishedPaperByPaperId($paperId);
135
139
136
		$enableComments = $schedConf->getSetting('enableComments', true);
140
		if ($paper == null) {
137
		$commentsRequireRegistration = $schedConf->getSetting('commentsRequireRegistration', true);
141
			Request::redirect(null, null, 'index');
138
		$commentsAllowAnonymous = $schedConf->getSetting('commentsAllowAnonymous', true);
142
		}
139
143
144
		// Bring in comment and view constants
145
		$commentDao = &DAORegistry::getDAO('CommentDAO');
146
		$enableComments = $conference->getSetting('enableComments');
140
147
141
		if (!Validation::isLoggedIn() && $schedConf->getSetting('restrictPaperAccess', true) || !$enableComments) {
148
		if (!$enableComments || !$paper->getEnableComments()) {
142
			Validation::redirectLogin();
149
			Request::redirect(null, null, 'index');
143
		}
150
		}
144
151
145
		// Registration Access
152
		$restrictPaperAccess = $conference->getSetting('restrictPaperAccess');
146
		$publishedPaperDao = &DAORegistry::getDAO('PublishedPaperDAO');
147
		$paper = &$publishedPaperDao->getPublishedPaperByPaperId($paperId);
148
153
149
		if (!isset($paper)) {
154
		if ($restrictPaperAccess && !Validation::isLoggedIn()) {
150
			Request::redirect(null, null, 'index');
155
			Validation::redirectLogin();
151
		}
156
		}
152
157
153
		return array(&$conference, &$schedConf, &$paper);
158
		return array(&$conference, &$schedConf, &$paper);
(-)ocs2/pages/paper/PaperHandler.inc.php:1.22 (-10 / +12 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * Handle requests for paper functions. 
12
 * Handle requests for paper functions. 
13
 *
13
 *
14
 * $Id: PaperHandler.inc.php,v 1.22 2008/06/20 10:05:33 michael Exp $
14
 * $Id: PaperHandler.inc.php,v 1.23 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
import('rt.ocs.RTDAO');
17
import('rt.ocs.RTDAO');
 Lines 124-134    Link Here 
124
		}
124
		}
125
125
126
		$commentDao = &DAORegistry::getDAO('CommentDAO');
126
		$commentDao = &DAORegistry::getDAO('CommentDAO');
127
		$enableComments = $schedConf->getSetting('enableComments', true);
127
		$enableComments = $conference->getSetting('enableComments');
128
		$commentsRequireRegistration = $schedConf->getSetting('commentsRequireRegistration', true);
128
		$commentsRequireRegistration = $conference->getSetting('commentsRequireRegistration');
129
		$commentsAllowAnonymous = $schedConf->getSetting('commentsAllowAnonymous', true);
129
		$commentsAllowAnonymous = $conference->getSetting('commentsAllowAnonymous');
130
130
131
		if ($enableComments) {
131
		if ($enableComments && $paper->getEnableComments()) {
132
			$comments = &$commentDao->getRootCommentsByPaperId($paper->getPaperId());
132
			$comments = &$commentDao->getRootCommentsByPaperId($paper->getPaperId());
133
		}
133
		}
134
134
 Lines 173-179    Link Here 
173
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
173
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
174
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
174
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
175
		$templateMgr->assign('commentsClosed', $commentsClosed);
175
		$templateMgr->assign('commentsClosed', $commentsClosed);
176
		$templateMgr->assign('postingAllowed', $enableComments && (!$commentsRequireRegistration || Validation::isLoggedIn()) && !$commentsClosed);
176
		$templateMgr->assign('postingAllowed', ($enableComments && !$commentsClosed && $paper->getEnableComments()) && (!$commentsRequireRegistration || Validation::isLoggedIn()));
177
		$templateMgr->assign('galleyId', $galleyId);
177
		$templateMgr->assign('galleyId', $galleyId);
178
		$templateMgr->assign('defineTermsContextId', isset($defineTermsContextId)?$defineTermsContextId:null);
178
		$templateMgr->assign('defineTermsContextId', isset($defineTermsContextId)?$defineTermsContextId:null);
179
		$templateMgr->assign('comments', isset($comments)?$comments:null);
179
		$templateMgr->assign('comments', isset($comments)?$comments:null);
 Lines 234-245    Link Here 
234
		// Bring in comment constants.
234
		// Bring in comment constants.
235
		$commentDao = &DAORegistry::getDAO('CommentDAO');
235
		$commentDao = &DAORegistry::getDAO('CommentDAO');
236
236
237
		$enableComments = $schedConf->getSetting('enableComments', true);
237
		$enableComments = $conference->getSetting('enableComments');
238
		$commentsRequireRegistration = $schedConf->getSetting('commentsRequireRegistration', true);
238
		$commentsRequireRegistration = $conference->getSetting('commentsRequireRegistration');
239
		$commentsAllowAnonymous = $schedConf->getSetting('commentsAllowAnonymous', true);
239
		$commentsAllowAnonymous = $conference->getSetting('commentsAllowAnonymous');
240
240
		$closeCommentsDate = $schedConf->getSetting('closeCommentsDate');
241
		$closeCommentsDate = $schedConf->getSetting('closeCommentsDate');
241
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
242
		$commentsClosed = $schedConf->getSetting('closeComments')?true:false && (strtotime($closeCommentsDate < time()));
242
		$postingAllowed = $enableComments && !$commentsClosed ? true : false;
243
244
		$postingAllowed = $enableComments && $paper->getEnableComments() && !$commentsClosed ? true : false;
243
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
245
		$templateMgr->assign('closeCommentsDate', $closeCommentsDate);
244
		$templateMgr->assign('commentsClosed', $commentsClosed);
246
		$templateMgr->assign('commentsClosed', $commentsClosed);
245
		$templateMgr->assign('postingAllowed', $postingAllowed);
247
		$templateMgr->assign('postingAllowed', $postingAllowed);
(-)ocs2/pages/trackDirector/SubmissionEditHandler.inc.php:1.31 (-1 / +20 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * Handle requests for submission tracking.
12
 * Handle requests for submission tracking.
13
 *
13
 *
14
 * $Id: SubmissionEditHandler.inc.php,v 1.31 2008/06/23 22:26:43 asmecher Exp $
14
 * $Id: SubmissionEditHandler.inc.php,v 1.32 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
define('TRACK_DIRECTOR_ACCESS_EDIT', 0x00001);
17
define('TRACK_DIRECTOR_ACCESS_EDIT', 0x00001);
 Lines 31-36    Link Here 
31
		$trackDao = &DAORegistry::getDAO('TrackDAO');
31
		$trackDao = &DAORegistry::getDAO('TrackDAO');
32
		$track = &$trackDao->getTrack($submission->getTrackId());
32
		$track = &$trackDao->getTrack($submission->getTrackId());
33
33
34
		$enableComments = $conference->getSetting('enableComments');
35
34
		$templateMgr = &TemplateManager::getManager();
36
		$templateMgr = &TemplateManager::getManager();
35
37
36
		$templateMgr->assign_by_ref('submission', $submission);
38
		$templateMgr->assign_by_ref('submission', $submission);
 Lines 42-50    Link Here 
42
		$templateMgr->assign_by_ref('reviewMode', $submission->getReviewMode());
44
		$templateMgr->assign_by_ref('reviewMode', $submission->getReviewMode());
43
		$templateMgr->assign('userId', $user->getUserId());
45
		$templateMgr->assign('userId', $user->getUserId());
44
		$templateMgr->assign('isDirector', $isDirector);
46
		$templateMgr->assign('isDirector', $isDirector);
47
		$templateMgr->assign('enableComments', $enableComments);
45
48
46
		$trackDao = &DAORegistry::getDAO('TrackDAO');
49
		$trackDao = &DAORegistry::getDAO('TrackDAO');
47
		$templateMgr->assign_by_ref('tracks', $trackDao->getTrackTitles($schedConf->getSchedConfId()));
50
		$templateMgr->assign_by_ref('tracks', $trackDao->getTrackTitles($schedConf->getSchedConfId()));
51
		if ($enableComments) {
52
			import('paper.Paper');
53
			$templateMgr->assign('commentsStatus', $submission->getCommentsStatus());
54
			$templateMgr->assign_by_ref('commentsStatusOptions', Paper::getCommentsStatusOptions());
55
		}
48
56
49
		$publishedPaperDao = &DAORegistry::getDAO('PublishedPaperDAO');
57
		$publishedPaperDao = &DAORegistry::getDAO('PublishedPaperDAO');
50
		$publishedPaper = &$publishedPaperDao->getPublishedPaperByPaperId($submission->getPaperId());
58
		$publishedPaper = &$publishedPaperDao->getPublishedPaperByPaperId($submission->getPaperId());
 Lines 928-933    Link Here 
928
		}
936
		}
929
	}
937
	}
930
938
939
	/**
940
	 * Set RT comments status for paper.
941
	 * @param $args array ($paperId)
942
	 */
943
	function updateCommentsStatus($args) {
944
		$paperId = isset($args[0]) ? (int) $args[0] : 0;
945
		list($conference, $schedConf, $submission) = SubmissionEditHandler::validate($paperId);		
946
		TrackDirectorAction::updateCommentsStatus($submission, Request::getUserVar('commentsStatus'));
947
		Request::redirect(null, null, null, 'submission', $paperId);
948
	}
949
931
950
932
	//
951
	//
933
	// Layout Editing
952
	// Layout Editing
(-)ocs2/pages/trackDirector/TrackDirectorHandler.inc.php:1.24 (-1 / +6 lines)
 Lines 11-17    Link Here 
11
 *
11
 *
12
 * Handle requests for track director functions. 
12
 * Handle requests for track director functions. 
13
 *
13
 *
14
 * $Id: TrackDirectorHandler.inc.php,v 1.24 2008/06/27 22:05:34 michael Exp $
14
 * $Id: TrackDirectorHandler.inc.php,v 1.25 2008/06/30 18:35:51 michael Exp $
15
 */
15
 */
16
16
17
import('submission.trackDirector.TrackDirectorAction');
17
import('submission.trackDirector.TrackDirectorAction');
 Lines 391-396    Link Here 
391
		SubmissionEditHandler::restoreToQueue($args);
391
		SubmissionEditHandler::restoreToQueue($args);
392
	}
392
	}
393
393
394
	function updateCommentsStatus($args) {
395
		import('pages.trackDirector.SubmissionEditHandler');
396
		SubmissionEditHandler::updateCommentsStatus($args);
397
	}
398
394
399
395
	//
400
	//
396
	// Layout Editing
401
	// Layout Editing
(-)ocs2/templates/comment/comments.tpl:1.14 (-6 / +6 lines)
 Lines 6-12    Link Here 
6
 *
6
 *
7
 * Display comments on a paper.
7
 * Display comments on a paper.
8
 *
8
 *
9
 * $Id: comments.tpl,v 1.14 2008/06/10 23:01:42 asmecher Exp $
9
 * $Id: comments.tpl,v 1.15 2008/06/30 18:35:51 michael Exp $
10
 *}
10
 *}
11
{if $comment}
11
{if $comment}
12
{assign var=pageTitle value="comments.readerComments"}
12
{assign var=pageTitle value="comments.readerComments"}
 Lines 71-80    Link Here 
71
71
72
<br /><br />
72
<br /><br />
73
73
74
<div class="separator"></div>
74
{if $comments}
75
75
	<div class="separator"></div>
76
{if $comments}<h3>{translate key="comments.replies"}</h3>{/if}
76
	<h3>{translate key="comments.replies"}</h3>{/if}
77
78
{/if}
77
{/if}
79
78
80
{foreach from=$comments item=child}
79
{foreach from=$comments item=child}
 Lines 154-160    Link Here 
154
153
155
{if $commentsClosed}{translate key="comments.commentsClosed" closeCommentsDate=$closeCommentsDate|date_format:$dateFormatShort}<br />{/if}
154
{if $commentsClosed}{translate key="comments.commentsClosed" closeCommentsDate=$closeCommentsDate|date_format:$dateFormatShort}<br />{/if}
156
155
157
{if $commentsAllowed}
156
{if $postingAllowed}
157
	<div class="separator"></div>
158
	<p><a class="action" href="{url op="add" path=$paperId|to_array:$galleyId}" target="_parent">{translate key="rt.addComment"}</a></p>
158
	<p><a class="action" href="{url op="add" path=$paperId|to_array:$galleyId}" target="_parent">{translate key="rt.addComment"}</a></p>
159
{/if}
159
{/if}
160
160
(-)ocs2/templates/manager/tracks/trackForm.tpl:1.15 (-1 / +10 lines)
 Lines 6-12    Link Here 
6
 *
6
 *
7
 * Form to create/modify a conference track.
7
 * Form to create/modify a conference track.
8
 *
8
 *
9
 * $Id: trackForm.tpl,v 1.15 2008/05/20 22:45:43 asmecher Exp $
9
 * $Id: trackForm.tpl,v 1.16 2008/06/30 18:35:51 michael Exp $
10
 *}
10
 *}
11
{assign var="pageTitle" value="track.track"}{assign var="pageCrumbTitle" value="track.tracks"}{include file="common/header.tpl"}
11
{assign var="pageTitle" value="track.track"}{assign var="pageCrumbTitle" value="track.tracks"}{include file="common/header.tpl"}
12
12
 Lines 149-154    Link Here 
149
		{fieldLabel name="hideAbout" key="manager.tracks.hideAbout"}
149
		{fieldLabel name="hideAbout" key="manager.tracks.hideAbout"}
150
	</td>
150
	</td>
151
</tr>
151
</tr>
152
{if $commentsEnabled}
153
<tr valign="top">
154
	<td class="label">{fieldLabel name="disableComments" key="comments.readerComments"}</td>
155
	<td class="value">
156
		<input type="checkbox" name="disableComments" id="disableComments" value="1" {if $disableComments}checked="checked"{/if} />
157
		{fieldLabel name="disableComments" key="manager.tracks.disableComments"}
158
	</td>
159
</tr>
160
{/if}
152
</table>
161
</table>
153
<div class="separator"></div>
162
<div class="separator"></div>
154
163
(-)ocs2/templates/rt/rt.tpl:1.17 (-4 / +5 lines)
 Lines 6-12    Link Here 
6
 *
6
 *
7
 * Reading Tools.
7
 * Reading Tools.
8
 *
8
 *
9
 * $Id: rt.tpl,v 1.17 2008/06/20 10:05:33 michael Exp $
9
 * $Id: rt.tpl,v 1.18 2008/06/30 18:35:51 michael Exp $
10
 *}
10
 *}
11
<?xml version="1.0" encoding="UTF-8"?>
11
<?xml version="1.0" encoding="UTF-8"?>
12
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
12
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 Lines 86-97    Link Here 
86
				{/if}
86
				{/if}
87
			</li>
87
			</li>
88
		{/if}
88
		{/if}
89
		{if $conferenceRt->getAddComment() && $postingAllowed && !$postingDisabled}
89
		{assign var=rtAddComment value=$conferenceRt->getAddComment()}
90
		{if $rtAddComment && $postingAllowed && !$postingDisabled}
90
			<li><a href="{url page="comment" op="add" path=$paper->getPaperId()|to_array:$galleyId}" target="_parent">{translate key="rt.addComment"}</a></li>
91
			<li><a href="{url page="comment" op="add" path=$paper->getPaperId()|to_array:$galleyId}" target="_parent">{translate key="rt.addComment"}</a></li>
91
		{elseif $commentsClosed}
92
		{elseif $rtAddComment && $commentsClosed}
92
			{translate key="rt.addComment"}†
93
			{translate key="rt.addComment"}†
93
			{assign var=needsCommentsNote value=1}
94
			{assign var=needsCommentsNote value=1}
94
		{elseif $postingDisabled}
95
		{elseif $rtAddComment && $postingDisabled}
95
			{translate key="rt.addComment"}*
96
			{translate key="rt.addComment"}*
96
			{assign var=needsLoginNote value=1}
97
			{assign var=needsLoginNote value=1}
97
		{/if}
98
		{/if}
(-)ocs2/templates/trackDirector/submission/status.tpl:1.8 (-1 / +8 lines)
 Lines 6-12    Link Here 
6
 *
6
 *
7
 * Subtemplate defining the submission status table.
7
 * Subtemplate defining the submission status table.
8
 *
8
 *
9
 * $Id: status.tpl,v 1.8 2008/04/04 17:06:56 asmecher Exp $
9
 * $Id: status.tpl,v 1.9 2008/06/30 18:35:51 michael Exp $
10
 *}
10
 *}
11
<a name="status"></a>
11
<a name="status"></a>
12
<h3>{translate key="common.status"}</h3>
12
<h3>{translate key="common.status"}</h3>
 Lines 45-48    Link Here 
45
		<td class="label">{translate key="submission.lastModified"}</td>
45
		<td class="label">{translate key="submission.lastModified"}</td>
46
		<td colspan="2" class="value">{$submission->getLastModified()|date_format:$dateFormatShort}</td>
46
		<td colspan="2" class="value">{$submission->getLastModified()|date_format:$dateFormatShort}</td>
47
	</tr>
47
	</tr>
48
{if $enableComments}
49
	<tr>
50
		<td class="label">{translate key="comments.readerComments"}</td>
51
		<td class="value">{translate key=$submission->getCommentsStatusString()}</td>
52
		<td class="value"><form action="{url op="updateCommentsStatus" path=$submission->getPaperId()}" method="post">{translate key="submission.changeComments"} <select name="commentsStatus" size="1" class="selectMenu">{html_options_translate options=$commentsStatusOptions selected=$submission->getCommentsStatus()}</select> <input type="submit" value="{translate key="common.record"}" class="button" /></form></td>
53
	</tr>
54
{/if}
48
</table>
55
</table>

Return to bug 3293