3 * FusionForge Artifact update Form
5 * Copyright 2010, FusionForge Team
6 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
8 * This file is part of FusionForge. FusionForge is free software;
9 * you can redistribute it and/or modify it under the terms of the
10 * GNU General Public License as published by the Free Software
11 * Foundation; either version 2 of the Licence, or (at your option)
14 * FusionForge is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 $ath->adminHeader(array('title'=>_('Customize Browse List'),'pagename'=>'tracker_admin_customize_liste','titlevals'=>array($ath->getName())));
27 List of possible user built Selection Boxes for an ArtifactType
29 $efarr = $ath->getExtraFields();
31 $browse_fields = explode(',',$ath->getBrowseList());
33 // Display regular fields.
35 'summary' => _('Summary'),
36 'open_date' => _('Open Date'),
37 'status_id' => _('State'),
38 'priority' => _('Priority'),
39 'assigned_to' => _('Assigned To'),
40 'submitted_by' => _('Submitted By'),
41 'close_date' => _('Close Date'),
42 'details' => _('Detailed description'),
43 'related_tasks' => _('Related tasks'),
44 'last_modified_date' => _('Last Modified Date')
47 if(count($ath->getExtraFields(array(ARTIFACT_EXTRAFIELDTYPE_STATUS))) > 0) {
48 unset($fields['status_id']);
52 foreach ($efarr as $f) {
53 $fields[$f[0]] = $f['field_name'];
60 foreach ($fields as $f => $name) {
61 $pos = array_search($f, $browse_fields);
63 $rows[$pos] = '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($pos) .'>'.'<td>'.$name.'</td>'."\n".
64 '<td class="align-right">'.
65 ($pos + 1).' --> <input type="text" name="order['.$f.']" value="" size="3" maxlength="3" />'.
67 '<td class="align-center">'.
68 '<a href="index.php?group_id='.$group_id.'&atid='.$ath->getID().'&id='.$f.
69 '&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> '.
70 '<a href="index.php?group_id='.$group_id.'&atid='.$ath->getID().'&id='.$f.
71 '&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>'.
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&delete_field=1">'.
76 html_image('ic/trash.png','','',array('alt'=>"Delete")).'</a>'.
81 $select .= '<option value="'.$f.'">'.$name.'</option>'."\n";
88 <?php echo _('Set order of the fields that will be displayed on the browse view of your tracker:') ?>
90 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
91 <input type="hidden" name="customize_list" value="1" />
92 <input type="hidden" name="post_changes" value="1" />
95 $title_arr[] = _('Fields');
96 $title_arr[] = _('Current / New positions');
97 $title_arr[] = _('Up/Down positions');
98 $title_arr[] = _('Delete');
100 echo $GLOBALS['HTML']->listTableTop ($title_arr,false, ' ');
101 echo implode('', $rows);
102 echo '<tr class="noborder">
105 <td class="align-right">
106 <input type="submit" name="field_changes_order" value="'._('Reorder').'" />
111 echo $GLOBALS['HTML']->listTableBottom();
114 <?php if ($select) { ?>
116 <?php echo _('Select the fields that will be displayed on the browse view of your tracker:') ?>
118 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
119 <input type="hidden" name="customize_list" value="1" />
120 <input type="hidden" name="add_field" value="1" />
121 <strong><?php echo _('Add New Field') ?>:</strong>
123 echo '<select name="field_to_add">'."\n";
125 echo '</select>'."\n";
127 <input type="submit" name="post_changes" value="<?php echo _('Add') ?>" />
132 $ath->footer(array());