diff options
author | ivan <ivan> | 2010-07-15 21:46:31 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-07-15 21:46:31 +0000 |
commit | 130c7801e718d55c500e9f777112f51905cad060 (patch) | |
tree | 33fb33c18c9a8674c3f81c0ed23d3774335b0849 /httemplate | |
parent | 24893d30ecc52b457e37214a598a07c5a0800c23 (diff) |
customer tags, RT#9192
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/browse/part_tag.html | 23 | ||||
-rw-r--r-- | httemplate/edit/part_tag.html | 23 | ||||
-rw-r--r-- | httemplate/edit/process/part_tag.html | 11 | ||||
-rw-r--r-- | httemplate/elements/menu.html | 5 |
4 files changed, 61 insertions, 1 deletions
diff --git a/httemplate/browse/part_tag.html b/httemplate/browse/part_tag.html new file mode 100644 index 000000000..3bb166199 --- /dev/null +++ b/httemplate/browse/part_tag.html @@ -0,0 +1,23 @@ +<% include( 'elements/browse.html', + 'title' => 'Tags', + 'name_singular' => 'tag', + 'menubar' => [ 'Add a new tag' => + $p.'edit/part_tag.html', + ], + 'query' => { 'table' => 'part_tag', }, + 'count_query' => 'SELECT COUNT(*) FROM part_tag', + 'header' => [ 'Tag', 'Description', 'Color' ], + 'fields' => [ 'tagname', 'tagdesc', 'tagcolor' ], + 'links' => [ $link, '', '' ], + 'disableable' => 1, + 'disabled_statuspos' => 1, + ) +%> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $link = [ "${p}edit/part_tag.html?", 'tagnum' ]; + +</%init> diff --git a/httemplate/edit/part_tag.html b/httemplate/edit/part_tag.html new file mode 100644 index 000000000..938e34256 --- /dev/null +++ b/httemplate/edit/part_tag.html @@ -0,0 +1,23 @@ +<% include( 'elements/edit.html', + 'table' => 'part_tag', + 'name_singular' => 'tag', + 'fields' => [ 'tagname', + { field=>'disabled', type=>'checkbox', value=>'Y' }, + 'tagdesc', + 'tagcolor' + ], + 'labels' => { 'tagnum' => 'Tag #', + 'tagname' => 'Tag', + 'tagdesc' => 'Description', + 'tagcolor' => 'Highlight Color', + 'disabled' => 'Disabled', + }, + 'viewall_dir' => 'browse', + ) +%> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +</%init> diff --git a/httemplate/edit/process/part_tag.html b/httemplate/edit/process/part_tag.html new file mode 100644 index 000000000..077dc4cd9 --- /dev/null +++ b/httemplate/edit/process/part_tag.html @@ -0,0 +1,11 @@ +<% include( 'elements/process.html', + 'table' => 'part_tag', + 'viewall_dir' => 'browse', + ) +%> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +</%init> diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 190455772..1eaefe231 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -475,6 +475,8 @@ tie my %config_misc, 'Tie::IxHash'; $config_misc{'Message templates'} = [ $fsurl.'browse/msg_template.html', 'Templates for customer notices' ] if $curuser->access_right('Edit templates') || $curuser->access_right('Edit global templates'); +$config_misc{'Tags'} = [ $fsurl.'browse/part_tag.html', '' ] + if $curuser->access_right('Configuration'); $config_misc{'Advertising sources'} = [ $fsurl.'browse/part_referral.html', 'Where a customer heard about your service.' ] if $curuser->access_right('Edit advertising sources') || $curuser->access_right('Edit global advertising sources'); @@ -518,7 +520,8 @@ $config_menu{'Broadband'} = [ \%config_broadband, '' ] $config_menu{'Phone'} = [ \%config_phone, '' ] if ( $curuser->access_right('Configuration') ); $config_menu{'Miscellaneous'} = [ \%config_misc, '' ] - if $curuser->access_right('Edit advertising sources') + if $curuser->access_right('Configuration' ) + || $curuser->access_right('Edit advertising sources') || $curuser->access_right('Edit global advertising sources'); |