5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2010 (c) Franck Villaume - Capgemini
7 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
8 * Copyright 2012, Franck Villaume - TrivialDev
9 * http://fusionforge.org/
11 * This file is part of FusionForge. FusionForge is free software;
12 * you can redistribute it and/or modify it under the terms of the
13 * GNU General Public License as published by the Free Software
14 * Foundation; either version 2 of the Licence, or (at your option)
17 * FusionForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 use_javascript('/tabber/tabber.js');
36 if (getStringFromRequest('commentsort') == 'anti') {
37 $sort_comments_chronologically = false;
39 $sort_comments_chronologically = true;
42 html_use_coolfieldset();
43 $ath->header(array ('title'=>'[#'. $ah->getID(). '] ' . $ah->getSummary(), 'atid'=>$ath->getID()));
48 <form id="trackermodform" action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&atid=<?php echo $ath->getID(); ?>" enctype="multipart/form-data" method="post">
49 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
50 <input type="hidden" name="func" value="postmod"/>
51 <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
52 <input type="hidden" name="artifact_id" value="<?php echo $ah->getID(); ?>"/>
56 if (session_loggedin()) {
60 if ($ah->isMonitoring()) {
63 $text=_('Stop monitor');
70 <a id="tracker-monitor" href="index.php?group_id='.$group_id.'&artifact_id='.$ah->getID().'&atid='.$ath->getID().'&func=monitor" title="'.util_html_secure(html_get_tooltip_description('monitor')).'"><strong>'.
71 html_image('ic/'.$img.'','20','20').' '.$text.'</strong></a>';
75 if ($group->usesPM()) {
77 <a href="'.getStringFromServer('PHP_SELF').'?func=taskmgr&group_id='.$group_id.'&atid='.$atid.'&aid='.$aid.'">'.
78 html_image('ic/taskman20w.png','20','20').'<strong>'._('Build Task Relation').'</strong></a>';
83 <a href="<?php echo getStringFromServer('PHP_SELF')."?func=deleteartifact&aid=$aid&group_id=$group_id&atid=$atid"; ?>"><strong><?php echo html_image('ic/trash.png','16','16') . _('Delete'); ?></strong></a>
86 <input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
92 <table border="0" width="80%">
95 <strong><?php echo _('Submitted by') ?>:</strong><br />
96 <?php echo $ah->getSubmittedRealName();
97 if($ah->getSubmittedBy() != 100) {
98 $submittedUnixName = $ah->getSubmittedUnixName();
99 $submittedBy = $ah->getSubmittedBy();
101 (<tt><?php echo util_make_link_u ($submittedUnixName,$submittedBy,$submittedUnixName); ?></tt>)
104 <td><strong><?php echo _('Date Submitted') ?>:</strong><br />
106 echo date(_('Y-m-d H:i'), $ah->getOpenDate() );
108 $close_date = $ah->getCloseDate();
109 if ($ah->getStatusID()==2 && $close_date > 1) {
110 echo '<br /><strong>'._('Date Closed').':</strong><br />'
111 .date(_('Y-m-d H:i'), $close_date);
118 <td><strong><?php echo _('Data Type') ?>:</strong><br />
121 $atf = new ArtifactTypeFactory ($group) ;
123 foreach ($atf->getArtifactTypes() as $at) {
124 if (forge_check_perm ('tracker', $at->getID(), 'manager')) {
125 $tids[] = $at->getID() ;
129 $res = db_query_params ('SELECT group_artifact_id, name
130 FROM artifact_group_list
131 WHERE group_artifact_id = ANY ($1)',
132 array (db_int_array_to_any_clause ($tids))) ;
134 echo html_build_select_box ($res,'new_artifact_type_id',$ath->getID(),false);
143 $ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any',array(),false,'UPDATE');
147 <td><strong><?php echo _('Assigned to')?>:</strong><br />
149 echo $ath->technicianBox('assigned_to', $ah->getAssignedTo() );
150 echo ' '.util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&update_users=1','('._('Admin').')');
153 <strong><?php echo _('Priority') ?>:</strong><br />
156 Priority of this request
158 build_priority_select_box('priority',$ah->getPriority());
165 <?php if (!$ath->usesCustomStatuses()) { ?>
166 <strong><?php echo _('State') ?>:</strong><br />
169 echo $ath->statusBox ('status_id', $ah->getStatusID() );
177 $ath->renderRelatedTasks($group, $ah);
178 $ath->renderFiles($group_id, $ah);
181 <td colspan="2"><strong><?php echo _('Summary')?><?php echo utils_requiredField(); ?>:</strong><br />
182 <input id="tracker-summary" title="<?php echo util_html_secure(_('The summary text-box represents a short tracker item summary. Useful when browsing through several tracker items.')) ?>" type="text" name="summary" size="70" value="<?php
183 echo $ah->getSummary();
184 ?>" maxlength="255" />
188 <div id="edit" style="display:none;">
189 <strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?>: <?php echo notepad_button('document.forms.trackermodform.description') ?></strong>
191 <textarea id="tracker-description" name="description" rows="30" cols="79" title="<?php echo util_html_secure(html_get_tooltip_description('description')) ?>"><?php echo $ah->getDetails(); ?></textarea>
193 <div id="show" style="display:block;">
194 <?php echo $ah->showDetails(true); ?>
198 <div id="tabber" class="tabber">
200 $count=db_numrows($ah->getMessages());
201 $nb = $count? ' ('.$count.')' : '';
203 <div class="tabbertab" title="<?php echo _('Followups').$nb; ?>">
206 <br /><strong><?php echo _('Use Canned Response') ?>:</strong><br />
208 echo $ath->cannedResponseBox('canned_response');
209 echo ' '.util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&add_canned=1','('._('Admin').')');
211 <script language="JavaScript" type="text/javascript">/* <![CDATA[ */
212 $('#tracker-canned_response').change(function() {
216 data: 'rtype=ajax&function=get_canned_response&group_id=<?php echo $group_id ?>&canned_response_id='+$('#tracker-canned_response').val(),
217 success: function(rep){
218 // the following line is not the best but works with IE6
219 $('#tracker-canned_response option').each(function() {$(this).attr("selected", "selected"); return false;});
220 if ($('#tracker-comment').val()) {
223 $('#tracker-comment').val($('#tracker-comment').val() + rep);
229 <strong><?php echo _('Add A Comment') ?>:<?php echo notepad_button('document.forms.trackermodform.details') ?></strong><br />
230 <textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea></p>
231 <h2><?php echo _('Followups: ') ;
232 if ($sort_comments_chronologically) {
234 util_make_url('/tracker/index.php?func=detail&aid=' . $aid . '&group_id=' . $group_id . '&atid=' . $ath->getID() . '&commentsort=anti') .
235 '">' . _('Sort comments antichronologically') . '</a>';
238 util_make_url('/tracker/index.php?func=detail&aid=' . $aid . '&group_id=' . $group_id . '&atid=' . $ath->getID() . '&commentsort=chrono') .
239 '">' . _('Sort comments chronologically') . '</a>';
242 echo $ah->showMessages($sort_comments_chronologically);
248 if ($group->usesPM()) {
250 <div class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
252 $ath->renderRelatedTasks($group, $ah);
258 $file_list = $ah->getFiles();
259 $count=count($file_list);
260 $nb = $count? ' ('.$count.')' : '';
262 <div class="tabbertab" title="<?php echo _('Attachments').$nb; ?>">
263 <h2><?php echo _('Existing Files') ?>:</h2>
266 <strong><?php echo _('Attach Files') ?>:</strong> <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?><br />
267 <input type="file" name="input_file0" size="30" /><br />
268 <input type="file" name="input_file1" size="30" /><br />
269 <input type="file" name="input_file2" size="30" /><br />
270 <input type="file" name="input_file3" size="30" /><br />
271 <input type="file" name="input_file4" size="30" /><br />
274 // print a list of files attached to this Artifact
276 $ath->renderFiles($group_id, $ah);
281 <div class="tabbertab" title="<?php echo _('Commits'); ?>">
282 <table border="0" width="80%">
283 <tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
285 $hookParams['artifact_id'] = $aid;
286 $hookParams['group_id'] = $group_id;
287 plugin_hook("artifact_extra_detail",$hookParams);
291 <div class="tabbertab" title="<?php echo _('Changes'); ?>">
292 <table border="0" width="80%">
295 <h2><?php echo _('Changes') ?>:</h2>
297 echo $ah->showHistory();
303 <?php $ah->showRelations(); ?>
308 $ath->footer(array());
312 // c-file-style: "bsd"