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 html_use_coolfieldset();
37 $ath->header(array ('title'=> $ah->getStringID().' '. $ah->getSummary(), 'atid'=>$ath->getID()));
42 <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">
43 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>" />
44 <input type="hidden" name="func" value="postmod" />
45 <input type="hidden" name="artifact_id" value="<?php echo $ah->getID(); ?>" />
49 if (session_loggedin()) {
53 if ($ah->isMonitoring()) {
56 $text=_('Stop Monitoring');
63 <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>'.
64 html_image('ic/'.$img.'','20','20').' '.$text.'</strong></a>';
68 if ($group->usesPM()) {
70 <a href="'.getStringFromServer('PHP_SELF').'?func=taskmgr&group_id='.$group_id.'&atid='.$atid.'&aid='.$aid.'">'.
71 html_image('ic/taskman20w.png','20','20').'<strong>'._('Build Task Relation').'</strong></a>';
76 <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>
79 <input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
88 <strong><?php echo _('Submitted by')._(':'); ?></strong><br />
89 <?php echo $ah->getSubmittedRealName();
90 if($ah->getSubmittedBy() != 100) {
91 $submittedUnixName = $ah->getSubmittedUnixName();
92 $submittedBy = $ah->getSubmittedBy();
94 (<tt><?php echo util_make_link_u ($submittedUnixName,$submittedBy,$submittedUnixName); ?></tt>)
97 <td><strong><?php echo _('Date Submitted')._(':'); ?></strong><br />
99 echo date(_('Y-m-d H:i'), $ah->getOpenDate() );
101 $close_date = $ah->getCloseDate();
102 if ($ah->getStatusID()==2 && $close_date > 1) {
103 echo '<br /><strong>'._('Date Closed')._(':').'</strong><br />'
104 .date(_('Y-m-d H:i'), $close_date);
111 <td><strong><?php echo _('Data Type'). _(': ') ?></strong><br />
114 $atf = new ArtifactTypeFactory ($group);
116 foreach ($atf->getArtifactTypes() as $at) {
117 if (forge_check_perm ('tracker', $at->getID(), 'manager')) {
118 $tids[] = $at->getID() ;
122 $res = db_query_params ('SELECT group_artifact_id, name
123 FROM artifact_group_list
124 WHERE group_artifact_id = ANY ($1)',
125 array (db_int_array_to_any_clause ($tids))) ;
127 echo html_build_select_box ($res,'new_artifact_type_id',$ath->getID(),false);
136 $ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any',array(),false,'UPDATE');
140 <td><strong><?php echo _('Assigned to')._(': ') ?></strong><br />
142 echo $ath->technicianBox('assigned_to', $ah->getAssignedTo() );
144 echo util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&update_users=1','('._('Admin').')');
147 <strong><?php echo _('Priority'). _(': ') ?></strong><br />
148 <?php build_priority_select_box('priority',$ah->getPriority()); ?>
152 <?php if (!$ath->usesCustomStatuses()) { ?>
155 <strong><?php echo _('State')._(': ') ?></strong><br />
156 <?php echo $ath->statusBox ('status_id', $ah->getStatusID() ); ?>
163 $ath->renderRelatedTasks($group, $ah);
164 $ath->renderFiles($group_id, $ah);
167 <td colspan="2"><strong><?php echo _('Summary')._(':'); ?><?php echo utils_requiredField(); ?></strong><br />
168 <input id="tracker-summary" required="required" title="<?php echo _('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
169 echo $ah->getSummary();
170 ?>" maxlength="255" />
174 <div id="edit" style="display:none;">
175 <strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?><?php echo _(': ') ?><?php echo notepad_button('document.forms.trackermodform.description') ?></strong>
177 <textarea id="tracker-description" required="required" name="description" rows="30" cols="79" title="<?php echo html_get_tooltip_description('description') ?>"><?php echo $ah->getDetails(); ?></textarea>
179 <div id="show" style="display:block;">
180 <?php $ah->showDetails(true); ?>
184 <div id="tabber" class="tabber">
186 $count=db_numrows($ah->getMessages());
187 $nb = $count? ' ('.$count.')' : '';
189 <div class="tabbertab" title="<?php echo _('Comments').$nb; ?>">
192 <br /><strong><?php echo _('Use Canned Response')._(':'); ?></strong><br />
194 echo $ath->cannedResponseBox('canned_response');
196 echo util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&add_canned=1','('._('Admin').')');
198 <script type="text/javascript">/* <![CDATA[ */
199 $('#tracker-canned_response').change(function() {
203 data: 'rtype=ajax&function=get_canned_response&group_id=<?php echo $group_id ?>&canned_response_id='+$('#tracker-canned_response').val(),
204 success: function(rep){
205 // the following line is not the best but works with IE6
206 $('#tracker-canned_response option').each(function() {$(this).attr("selected", "selected"); return false;});
207 if ($('#tracker-comment').val()) {
210 $('#tracker-comment').val($('#tracker-comment').val() + rep);
216 <strong><?php echo _('Post Comment')._(': ') ?><?php echo notepad_button('document.forms.trackermodform.details') ?></strong><br />
217 <textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea></p>
218 <h2><?php echo _('Comments')._(': ');
226 if ($group->usesPM()) {
228 <div class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
230 $ath->renderRelatedTasks($group, $ah);
236 $file_list = $ah->getFiles();
237 $count=count($file_list);
238 $nb = $count? ' ('.$count.')' : '';
240 <div class="tabbertab" title="<?php echo _('Attachments').$nb; ?>">
241 <h2><?php echo _('Existing Files')._(':'); ?></h2>
244 <strong><?php echo _('Attach Files')._(':'); ?></strong> <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?><br />
245 <input type="file" name="input_file0" size="30" /><br />
246 <input type="file" name="input_file1" size="30" /><br />
247 <input type="file" name="input_file2" size="30" /><br />
248 <input type="file" name="input_file3" size="30" /><br />
249 <input type="file" name="input_file4" size="30" /><br />
252 // print a list of files attached to this Artifact
254 $ath->renderFiles($group_id, $ah);
259 <div class="tabbertab" title="<?php echo _('Commits'); ?>">
261 <tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
263 $hookParams['artifact_id'] = $aid;
264 $hookParams['group_id'] = $group_id;
265 plugin_hook("artifact_extra_detail",$hookParams);
269 <div class="tabbertab" title="<?php echo _('Changes'); ?>">
270 <h2><?php echo _('Changes') ?></h2>
271 <?php $ah->showHistory(); ?>
273 <?php $ah->showRelations(); ?>
278 $ath->footer(array());
282 // c-file-style: "bsd"