3 * FusionForge Artifact update Form
5 * Copyright 2010, FusionForge Team
6 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
7 * Copyright 2012, Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 $ath->adminHeader(array('title'=>_('Customize Browse List'),
26 'pagename'=>'tracker_admin_customize_liste',
27 'titlevals'=>array($ath->getName())));
30 List of possible user built Selection Boxes for an ArtifactType
32 $efarr = $ath->getExtraFields();
34 $browse_fields = explode(',',$ath->getBrowseList());
36 // Display regular fields.
38 'summary' => _('Summary'),
39 'open_date' => _('Open Date'),
40 'status_id' => _('State'),
41 'priority' => _('Priority'),
42 'assigned_to' => _('Assigned to'),
43 'submitted_by' => _('Submitted by'),
44 'close_date' => _('Close Date'),
45 'details' => _('Detailed description'),
46 'related_tasks' => _('Related Tasks'),
47 'last_modified_date' => _('Last Modified Date'),
48 '_votes' => _('# Votes'),
49 '_voters' => _('# Voters'),
50 '_votage' => _('% Votes')
53 if(count($ath->getExtraFields(array(ARTIFACT_EXTRAFIELDTYPE_STATUS))) > 0) {
54 unset($fields['status_id']);
58 foreach ($efarr as $f) {
59 $fields[$f[0]] = $f['field_name'];
66 foreach ($fields as $f => $name) {
67 $pos = array_search($f, $browse_fields);
69 $rows[$pos] = '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($pos) .'>'.'<td>'.$name.'</td>'."\n".
70 '<td class="align-right">'.
71 ($pos + 1).' --> <input type="text" name="order['.$f.']" value="" size="3" maxlength="3" />'.
73 '<td class="align-center">'.
74 '<a href="index.php?group_id='.$group_id.'&atid='.$ath->getID().'&id='.$f.
75 '&customize_list=1&post_changes=1&updownorder_field=1&new_pos='.(($pos == 0)? $pos + 1 : $pos).'">'.html_image('ic/btn_up.png','19','18',array('alt'=>"Up")).'</a> '.
76 '<a href="index.php?group_id='.$group_id.'&atid='.$ath->getID().'&id='.$f.
77 '&customize_list=1&post_changes=1&updownorder_field=1&new_pos='.(($pos == count($browse_fields) - 1)? $pos + 1 : $pos + 2).'">'.html_image('ic/btn_down.png','19','18',array('alt'=>"Down")).'</a>'.
79 '<td class="align-center">'.
80 '<a href="index.php?group_id='.$group_id.'&atid='.$ath->getID().'&id='.$f.
81 '&customize_list=1&post_changes=1&delete_field=1">'.
82 html_image('ic/trash.png','','',array('alt'=>"Delete")).'</a>'.
87 $select .= '<option value="'.$f.'">'.$name.'</option>'."\n";
94 <?php echo _('Set order of the fields that will be displayed on the browse view of your tracker:') ?>
96 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
97 <input type="hidden" name="customize_list" value="1" />
98 <input type="hidden" name="post_changes" value="1" />
100 $title_arr = array();
101 $title_arr[] = _('Fields');
102 $title_arr[] = _('Current / New positions');
103 $title_arr[] = _('Up/Down positions');
104 $title_arr[] = _('Delete');
106 echo $GLOBALS['HTML']->listTableTop ($title_arr,false, ' ');
107 echo implode('', $rows);
108 echo '<tr class="noborder">
111 <td class="align-right">
112 <input type="submit" name="field_changes_order" value="'._('Reorder').'" />
117 echo $GLOBALS['HTML']->listTableBottom();
120 <?php if ($select) { ?>
122 <?php echo _('Select the fields that will be displayed on the browse view of your tracker:') ?>
124 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
125 <input type="hidden" name="customize_list" value="1" />
126 <input type="hidden" name="add_field" value="1" />
127 <strong><?php echo _('Add New Field')._(':'); ?></strong>
129 echo '<select name="field_to_add">'."\n";
131 echo '</select>'."\n";
133 <input type="submit" name="post_changes" value="<?php echo _('Add') ?>" />