summaryrefslogtreecommitdiff
path: root/httemplate/browse/part_tag.html
blob: b899fd3d008db690b38410a9734f8e6ab73fb2a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<% include( 'elements/browse.html',
              'title'         => 'Customer tags',
              'name_singular' => 'customer tag',
              'menubar'       => [ 'Add a new customer tag' =>
                                     $p.'edit/part_tag.html',
                                 ],
              'query'         => { 'table' => 'part_tag', },
              'count_query'   => 'SELECT COUNT(*) FROM part_tag',
              'header'        => [ 'Tag', 'Message', ],
              'fields'        => [ 'tagname', 'tagdesc', ],
              'links'         => [ $link, '', ],
              'cell_style'    => [ '', $tagdesc_style ],
              'disableable'   => 1,
              'disabled_statuspos' => 1,
          )
%>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my $tagdesc_style = sub { 'background-color:#'.shift->tagcolor };

my $link = [ "${p}edit/part_tag.html?", 'tagnum' ];

</%init>