import torrus 1.0.9
[freeside.git] / httemplate / browse / part_tag.html
1 <% include( 'elements/browse.html',
2               'title'         => 'Tags',
3               'name_singular' => 'tag',
4               'menubar'       => [ 'Add a new tag' =>
5                                      $p.'edit/part_tag.html',
6                                  ],
7               'query'         => { 'table' => 'part_tag', },
8               'count_query'   => 'SELECT COUNT(*) FROM part_tag',
9               'header'        => [ 'Tag', 'Message', ],
10               'fields'        => [ 'tagname', 'tagdesc', ],
11               'links'         => [ $link, '', ],
12               'cell_style'    => [ '', $tagdesc_style ],
13               'disableable'   => 1,
14               'disabled_statuspos' => 1,
15           )
16 %>
17 <%init>
18
19 die "access denied"
20   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
21
22 my $tagdesc_style = sub { 'background-color:#'.shift->tagcolor };
23
24 my $link = [ "${p}edit/part_tag.html?", 'tagnum' ];
25
26 </%init>