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');
28 if (getStringFromRequest('commentsort') == 'anti') {
29 $sort_comments_chronologically = false;
31 $sort_comments_chronologically = true;
34 $ath->header(array ('title'=>'[#'. $ah->getID(). '] ' . $ah->getSummary(), 'atid'=>$ath->getID()));
39 <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">
40 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
41 <input type="hidden" name="func" value="postmod"/>
42 <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
43 <input type="hidden" name="artifact_id" value="<?php echo $ah->getID(); ?>"/>
47 if (session_loggedin()) {
51 if ($ah->isMonitoring()) {
54 $text=_('Stop monitor');
61 <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>'.
62 html_image('ic/'.$img.'','20','20').' '.$text.'</strong></a>';
66 if ($group->usesPM()) {
68 <a href="'.getStringFromServer('PHP_SELF').'?func=taskmgr&group_id='.$group_id.'&atid='.$atid.'&aid='.$aid.'">'.
69 html_image('ic/taskman20w.png','20','20').'<strong>'._('Build Task Relation').'</strong></a>';
74 <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>
77 <input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
83 <table border="0" width="80%">
86 <strong><?php echo _('Submitted by') ?>:</strong><br />
87 <?php echo $ah->getSubmittedRealName();
88 if($ah->getSubmittedBy() != 100) {
89 $submittedUnixName = $ah->getSubmittedUnixName();
90 $submittedBy = $ah->getSubmittedBy();
92 (<tt><?php echo util_make_link_u ($submittedUnixName,$submittedBy,$submittedUnixName); ?></tt>)
95 <td><strong><?php echo _('Date Submitted') ?>:</strong><br />
97 echo date(_('Y-m-d H:i'), $ah->getOpenDate() );
99 $close_date = $ah->getCloseDate();
100 if ($ah->getStatusID()==2 && $close_date > 1) {
101 echo '<br /><strong>'._('Date Closed').':</strong><br />'
102 .date(_('Y-m-d H:i'), $close_date);
109 <td><strong><?php echo _('Data Type') ?>:</strong><br />
112 $atf = new ArtifactTypeFactory ($group) ;
114 foreach ($atf->getArtifactTypes() as $at) {
115 if (forge_check_perm ('tracker', $at->getID(), 'manager')) {
116 $tids[] = $at->getID() ;
120 $res = db_query_params ('SELECT group_artifact_id, name
121 FROM artifact_group_list
122 WHERE group_artifact_id = ANY ($1)',
123 array (db_int_array_to_any_clause ($tids))) ;
125 echo html_build_select_box ($res,'new_artifact_type_id',$ath->getID(),false);
134 $ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any',array(),false,'UPDATE');
138 <td><strong><?php echo _('Assigned to')?>:</strong><br />
140 echo $ath->technicianBox('assigned_to', $ah->getAssignedTo() );
141 echo ' '.util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&update_users=1','('._('Admin').')');
144 <strong><?php echo _('Priority') ?>:</strong><br />
147 Priority of this request
149 build_priority_select_box('priority',$ah->getPriority());
156 <?php if (!$ath->usesCustomStatuses()) { ?>
157 <strong><?php echo _('State') ?>:</strong><br />
160 echo $ath->statusBox ('status_id', $ah->getStatusID() );
168 $ath->renderRelatedTasks($group, $ah);
169 $ath->renderFiles($group_id, $ah);
172 <td colspan="2"><strong><?php echo _('Summary')?><?php echo utils_requiredField(); ?>:</strong><br />
173 <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
174 echo $ah->getSummary();
175 ?>" maxlength="255" />
179 <div id="edit" style="display:none;">
180 <strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?>: <?php echo notepad_button('document.forms.trackermodform.description') ?></strong>
182 <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>
184 <div id="show" style="display:block;">
185 <?php echo $ah->showDetails(true); ?>
189 <div id="tabber" class="tabber">
191 $count=db_numrows($ah->getMessages());
192 $nb = $count? ' ('.$count.')' : '';
194 <div class="tabbertab" title="<?php echo _('Followups').$nb; ?>">
197 <br /><strong><?php echo _('Use Canned Response') ?>:</strong><br />
199 echo $ath->cannedResponseBox('canned_response');
200 echo ' '.util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&add_canned=1','('._('Admin').')');
202 <script language="JavaScript" type="text/javascript">/* <![CDATA[ */
203 $('#tracker-canned_response').change(function() {
207 data: 'rtype=ajax&function=get_canned_response&group_id=<?php echo $group_id ?>&canned_response_id='+$('#tracker-canned_response').val(),
208 success: function(rep){
209 // the following line is not the best but works with IE6
210 $('#tracker-canned_response option').each(function() {$(this).attr("selected", "selected"); return false;});
211 if ($('#tracker-comment').val()) {
214 $('#tracker-comment').val($('#tracker-comment').val() + rep);
220 <strong><?php echo _('Add A Comment') ?>:<?php echo notepad_button('document.forms.trackermodform.details') ?></strong><br />
221 <textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea></p>
222 <h2><?php echo _('Followups: ') ;
223 if ($sort_comments_chronologically) {
225 util_make_url('/tracker/index.php?func=detail&aid=' . $aid . '&group_id=' . $group_id . '&atid=' . $ath->getID() . '&commentsort=anti') .
226 '">' . _('Sort comments antichronologically') . '</a>';
229 util_make_url('/tracker/index.php?func=detail&aid=' . $aid . '&group_id=' . $group_id . '&atid=' . $ath->getID() . '&commentsort=chrono') .
230 '">' . _('Sort comments chronologically') . '</a>';
233 echo $ah->showMessages($sort_comments_chronologically);
239 if ($group->usesPM()) {
241 <div class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
243 $ath->renderRelatedTasks($group, $ah);
249 $file_list = $ah->getFiles();
250 $count=count($file_list);
251 $nb = $count? ' ('.$count.')' : '';
253 <div class="tabbertab" title="<?php echo _('Attachments').$nb; ?>">
254 <h2><?php echo _('Existing Files') ?>:</h2>
257 <strong><?php echo _('Attach Files') ?>:</strong><br />
258 <input type="file" name="input_file0" size="30" /><br />
259 <input type="file" name="input_file1" size="30" /><br />
260 <input type="file" name="input_file2" size="30" /><br />
261 <input type="file" name="input_file3" size="30" /><br />
262 <input type="file" name="input_file4" size="30" /><br />
265 // print a list of files attached to this Artifact
267 $ath->renderFiles($group_id, $ah);
272 <div class="tabbertab" title="<?php echo _('Commits'); ?>">
273 <table border="0" width="80%">
274 <tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
276 $hookParams['artifact_id'] = $aid;
277 $hookParams['group_id'] = $group_id;
278 plugin_hook("artifact_extra_detail",$hookParams);
282 <div class="tabbertab" title="<?php echo _('Changes'); ?>">
283 <table border="0" width="80%">
286 <h2><?php echo _('Changes') ?>:</h2>
288 echo $ah->showHistory();
294 <?php $ah->showRelations(); ?>
299 $ath->footer(array());
303 // c-file-style: "bsd"