5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2010 (c) Franck Villaume - Capgemini
7 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
8 * http://fusionforge.org/
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 use_javascript('/tabber/tabber.js');
35 if (getStringFromRequest('commentsort') == 'anti') {
36 $sort_comments_chronologically = false;
38 $sort_comments_chronologically = true;
41 html_use_coolfieldset();
42 $ath->header(array ('title'=>'[#'. $ah->getID(). '] ' . $ah->getSummary(), 'atid'=>$ath->getID()));
47 <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">
48 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
49 <input type="hidden" name="func" value="postmod"/>
50 <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
51 <input type="hidden" name="artifact_id" value="<?php echo $ah->getID(); ?>"/>
55 if (session_loggedin()) {
59 if ($ah->isMonitoring()) {
62 $text=_('Stop monitor');
69 <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>'.
70 html_image('ic/'.$img.'','20','20').' '.$text.'</strong></a>';
74 if ($group->usesPM()) {
76 <a href="'.getStringFromServer('PHP_SELF').'?func=taskmgr&group_id='.$group_id.'&atid='.$atid.'&aid='.$aid.'">'.
77 html_image('ic/taskman20w.png','20','20').'<strong>'._('Build Task Relation').'</strong></a>';
82 <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>
85 <input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
91 <table border="0" width="80%">
94 <strong><?php echo _('Submitted by') ?>:</strong><br />
95 <?php echo $ah->getSubmittedRealName();
96 if($ah->getSubmittedBy() != 100) {
97 $submittedUnixName = $ah->getSubmittedUnixName();
98 $submittedBy = $ah->getSubmittedBy();
100 (<tt><?php echo util_make_link_u ($submittedUnixName,$submittedBy,$submittedUnixName); ?></tt>)
103 <td><strong><?php echo _('Date Submitted') ?>:</strong><br />
105 echo date(_('Y-m-d H:i'), $ah->getOpenDate() );
107 $close_date = $ah->getCloseDate();
108 if ($ah->getStatusID()==2 && $close_date > 1) {
109 echo '<br /><strong>'._('Date Closed').':</strong><br />'
110 .date(_('Y-m-d H:i'), $close_date);
117 <td><strong><?php echo _('Data Type') ?>:</strong><br />
120 $atf = new ArtifactTypeFactory ($group) ;
122 foreach ($atf->getArtifactTypes() as $at) {
123 if (forge_check_perm ('tracker', $at->getID(), 'manager')) {
124 $tids[] = $at->getID() ;
128 $res = db_query_params ('SELECT group_artifact_id, name
129 FROM artifact_group_list
130 WHERE group_artifact_id = ANY ($1)',
131 array (db_int_array_to_any_clause ($tids))) ;
133 echo html_build_select_box ($res,'new_artifact_type_id',$ath->getID(),false);
142 $ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any',array(),false,'UPDATE');
146 <td><strong><?php echo _('Assigned to')?>:</strong><br />
148 echo $ath->technicianBox('assigned_to', $ah->getAssignedTo() );
149 echo ' '.util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&update_users=1','('._('Admin').')');
152 <strong><?php echo _('Priority') ?>:</strong><br />
155 Priority of this request
157 build_priority_select_box('priority',$ah->getPriority());
164 <?php if (!$ath->usesCustomStatuses()) { ?>
165 <strong><?php echo _('State') ?>:</strong><br />
168 echo $ath->statusBox ('status_id', $ah->getStatusID() );
176 $ath->renderRelatedTasks($group, $ah);
177 $ath->renderFiles($group_id, $ah);
180 <td colspan="2"><strong><?php echo _('Summary')?><?php echo utils_requiredField(); ?>:</strong><br />
181 <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
182 echo $ah->getSummary();
183 ?>" maxlength="255" />
187 <div id="edit" style="display:none;">
188 <strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?>: <?php echo notepad_button('document.forms.trackermodform.description') ?></strong>
190 <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>
192 <div id="show" style="display:block;">
193 <?php echo $ah->showDetails(true); ?>
197 <div id="tabber" class="tabber">
199 $count=db_numrows($ah->getMessages());
200 $nb = $count? ' ('.$count.')' : '';
202 <div class="tabbertab" title="<?php echo _('Followups').$nb; ?>">
205 <br /><strong><?php echo _('Use Canned Response') ?>:</strong><br />
207 echo $ath->cannedResponseBox('canned_response');
208 echo ' '.util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&add_canned=1','('._('Admin').')');
210 <script language="JavaScript" type="text/javascript">/* <![CDATA[ */
211 $('#tracker-canned_response').change(function() {
215 data: 'rtype=ajax&function=get_canned_response&group_id=<?php echo $group_id ?>&canned_response_id='+$('#tracker-canned_response').val(),
216 success: function(rep){
217 // the following line is not the best but works with IE6
218 $('#tracker-canned_response option').each(function() {$(this).attr("selected", "selected"); return false;});
219 if ($('#tracker-comment').val()) {
222 $('#tracker-comment').val($('#tracker-comment').val() + rep);
228 <strong><?php echo _('Add A Comment') ?>:<?php echo notepad_button('document.forms.trackermodform.details') ?></strong><br />
229 <textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea></p>
230 <h2><?php echo _('Followups: ') ;
231 if ($sort_comments_chronologically) {
233 util_make_url('/tracker/index.php?func=detail&aid=' . $aid . '&group_id=' . $group_id . '&atid=' . $ath->getID() . '&commentsort=anti') .
234 '">' . _('Sort comments antichronologically') . '</a>';
237 util_make_url('/tracker/index.php?func=detail&aid=' . $aid . '&group_id=' . $group_id . '&atid=' . $ath->getID() . '&commentsort=chrono') .
238 '">' . _('Sort comments chronologically') . '</a>';
241 echo $ah->showMessages($sort_comments_chronologically);
247 if ($group->usesPM()) {
249 <div class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
251 $ath->renderRelatedTasks($group, $ah);
257 $file_list = $ah->getFiles();
258 $count=count($file_list);
259 $nb = $count? ' ('.$count.')' : '';
261 <div class="tabbertab" title="<?php echo _('Attachments').$nb; ?>">
262 <h2><?php echo _('Existing Files') ?>:</h2>
265 <strong><?php echo _('Attach Files') ?>:</strong><br />
266 <input type="file" name="input_file0" size="30" /><br />
267 <input type="file" name="input_file1" size="30" /><br />
268 <input type="file" name="input_file2" size="30" /><br />
269 <input type="file" name="input_file3" size="30" /><br />
270 <input type="file" name="input_file4" size="30" /><br />
273 // print a list of files attached to this Artifact
275 $ath->renderFiles($group_id, $ah);
280 <div class="tabbertab" title="<?php echo _('Commits'); ?>">
281 <table border="0" width="80%">
282 <tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
284 $hookParams['artifact_id'] = $aid;
285 $hookParams['group_id'] = $group_id;
286 plugin_hook("artifact_extra_detail",$hookParams);
290 <div class="tabbertab" title="<?php echo _('Changes'); ?>">
291 <table border="0" width="80%">
294 <h2><?php echo _('Changes') ?>:</h2>
296 echo $ah->showHistory();
302 <?php $ah->showRelations(); ?>
307 $ath->footer(array());
311 // c-file-style: "bsd"