5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
7 * Copyright 2012, Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
8 * Copyright 2012-2016,2018, 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.
34 html_use_coolfieldset();
36 $ath->header(array('title'=> $ah->getStringID().' '. $ah->getSummary(), 'atid'=>$ath->getID()));
40 echo $HTML->openForm(array('id' => 'trackerdetailform', 'action' => '/tracker/?group_id='.$group_id.'&atid='.$ath->getID(), 'method' => 'post', 'enctype' => 'multipart/form-data'));
41 if (session_loggedin()) {
42 echo $HTML->listTableTop(array(), array(), 'full'); ?>
46 if ($ah->isMonitoring()) {
48 $text=_('Stop monitoring');
53 echo util_make_link('/tracker/?group_id='.$group_id.'&artifact_id='.$ah->getID().'&atid='.$ath->getID().'&func=monitor', html_e('strong', array(), html_image('ic/'.$img, 20, 20).' '.$text), array('id' => 'tracker-monitor', 'title' => util_html_secure(html_get_tooltip_description('monitor'))));
57 $votes = $ah->getVotes();
58 echo html_e('span', array('id' => 'tracker-votes', 'title' => html_get_tooltip_description('votes')), html_e('strong', array(), _('Votes') . _(': ')).sprintf('%1$d/%2$d (%3$d%%)', $votes[0], $votes[1], $votes[2]));
59 if ($ath->canVote()) {
61 $key = 'pointer_down';
62 $txt = _('Retract Vote');
65 $txt = _('Cast Vote');
67 echo util_make_link('/tracker/?group_id='.$group_id.'&aid='.$ah->getID().'&atid='.$ath->getID().'&func='.$key, html_image('ic/'.$key.'.png', 16, 16), array('id' => 'tracker-vote', 'alt' => $txt, 'title' => util_html_secure(html_get_tooltip_description('vote'))));
72 <input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
75 <?php echo $HTML->listTableBottom(); ?>
77 echo $HTML->listTableTop(array(), array(), 'full'); ?>
80 <strong><?php echo _('Date')._(':'); ?></strong><br />
81 <?php echo date( _('Y-m-d H:i'), $ah->getOpenDate() ); ?>
84 <strong><?php echo _('Priority')._(':'); ?></strong><br />
85 <?php echo $ah->getPriority(); ?>
91 <strong><?php echo _('State')._(':'); ?></strong><br />
92 <?php echo $ah->getStatusName(); ?>
98 <strong><?php echo _('Submitted by')._(':'); ?></strong><br />
99 <?php echo $ah->getSubmittedRealName();
100 if($ah->getSubmittedBy() != 100) {
101 $submittedUnixName = $ah->getSubmittedUnixName();
102 $submittedBy = $ah->getSubmittedBy();
104 (<samp><?php echo util_make_link_u ($submittedUnixName,$submittedBy,$submittedUnixName); ?></samp>)
108 <strong><?php echo _('Assigned to')._(':'); ?></strong><br />
109 <?php echo $ah->getAssignedRealName(); ?> (<?php echo $ah->getAssignedUnixName(); ?>)
114 $ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any',array(),false,'DISPLAY');
119 <strong><?php echo _('Summary')._(':'); ?></strong><br />
120 <?php echo $ah->getSummary(); ?>
126 <?php echo $ah->showDetails(); ?>
128 <?php echo $HTML->listTableBottom(); ?>
130 $count=db_numrows($ah->getMessages());
131 $nb = $count? ' ('.$count.')' : '';
132 $file_list = $ah->getFiles();
133 $count=count($file_list);
134 $nbf = $count? ' ('.$count.')' : '';
135 $pm = plugin_manager_get_object();
136 $pluginsListeners = $pm->GetHookListeners('artifact_extra_detail');
137 $pluginfound = false;
138 foreach ($pluginsListeners as $pluginsListener) {
139 if ($ath->Group->usesPlugin($pluginsListener)) {
144 $count=db_numrows($ah->getHistory());
145 $nbh = $count? ' ('.$count.')' : '';
149 <li><a href="#tabber-comments"><?php echo _('Comments').$nb; ?></a></li>
150 <?php if ($group->usesPM()) {
151 $count= db_numrows($ah->getRelatedTasks());
152 $nbrt = $count? ' ('.$count.')' : '';
154 <li><a href="#tabber-tasks"><?php echo _('Related Tasks').$nbrt; ?></a></li>
156 <li><a href="#tabber-attachments"><?php echo _('Attachments').$nbf; ?></a></li>
157 <?php if ($pluginfound) { ?>
158 <li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
160 <li><a href="#tabber-changes"><?php echo _('Changes').$nbh; ?></a></li>
161 <?php if ($ah->hasRelations()) {
162 $count=db_numrows($ah->getRelations());
163 $nbr = $count? ' ('.$count.')' : '';
165 <li><a href="#tabber-relations"><?php echo _('Relations').$nbr; ?></a></li>
167 <?php if (forge_get_config('use_artefacts_dependencies')) {
168 $countC=$ah->hasChildren()?$ah->hasChildren():0;
169 $countP=$ah->hasParent()?1:0;
170 $nbd = $countC+$countP? ' ('.$countP.'/'.$countC.')' : '';
172 <li><a href="#tabber-dependencies"><?php echo _('Dependencies').$nbd; ?></a></li>
174 <?php if (forge_get_config('use_object_associations')) {
176 if ($ah->getAssociationCounter()) {
177 $anf = ' ('.$ah->getAssociationCounter().')';
179 <li><a href="#tabber-object-associations"><?php echo _('Associations').$anf; ?></a></li>
182 <div id="tabber-comments" class="tabbertab">
183 <?php echo $HTML->listTableTop();
184 if (session_loggedin() && ($ah->getSubmittedBy() == user_getid())) { ?>
186 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>" />
187 <input type="hidden" name="func" value="postmod" />
188 <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
189 <input type="hidden" name="artifact_id" value="<?php echo $ah->getID(); ?>" />
191 <strong><?php echo _('Add A Comment')._(':'); ?></strong>
192 <?php echo notepad_button('document.forms.trackerdetailform.details') ?><br />
193 <textarea name="details" rows="10" style="width: 100%; box-sizing: border-box;" ></textarea>
198 <?php echo $ah->showMessages(); ?>
200 <?php echo $HTML->listTableBottom(); ?>
203 if ($group->usesPM()) {
205 <div id="tabber-tasks" class="tabbertab">
207 echo $ath->renderRelatedTasks($group, $ah);
212 <div id="tabber-attachments" class="tabbertab">
213 <?php if (session_loggedin() && ($ah->getSubmittedBy() == user_getid())) {
214 echo $HTML->listTableTop(); ?>
216 <strong><?php echo _('Attach Files')._(':'); ?></strong> <?php echo '('._('max upload size')._(': ').human_readable_bytes(util_get_maxuploadfilesize()).')'; ?><br />
217 <input type="file" name="input_file0" /><br />
218 <input type="file" name="input_file1" /><br />
219 <input type="file" name="input_file2" /><br />
220 <input type="file" name="input_file3" /><br />
221 <input type="file" name="input_file4" /><br />
223 <?php echo $HTML->listTableBottom();
226 // print a list of files attached to this Artifact
228 echo $ath->renderFiles($group_id, $ah);
234 <div id="tabber-commits" class="tabbertab">
235 <?php echo $HTML->listTableTop(); ?>
236 <tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
238 $hookParams['artifact_id'] = $aid;
239 $hookParams['group_id'] = $group_id;
240 plugin_hook("artifact_extra_detail",$hookParams);
242 <?php echo $HTML->listTableBottom(); ?>
247 <div id="tabber-changes" class="tabbertab">
248 <?php echo $ah->showHistory(); ?>
250 <?php if ($ah->hasRelations()) { ?>
251 <div id="tabber-relations" class="tabbertab">
252 <?php echo $ah->showRelations(); ?>
255 if (forge_get_config('use_artefacts_dependencies')) { ?>
256 <div id="tabber-dependencies" class="tabbertab">
257 <?php echo $ah->showDependencies()
261 if (forge_get_config('use_object_associations')) { ?>
262 <div id="tabber-object-associations" class="tabbertab">
263 <?php echo $ah->showAssociations(); ?>
267 <?php if (session_loggedin() && ($ah->getSubmittedBy() == user_getid())) {
268 echo $HTML->listTableTop(); ?>
271 <input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
274 <?php echo $HTML->listTableBottom();
276 echo $HTML->closeForm();
281 // c-file-style: "bsd"