diff options
author | ivan <ivan> | 2010-07-15 21:47:03 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-07-15 21:47:03 +0000 |
commit | 96a5362009cade1872f5de8cab41951c6ee57ef9 (patch) | |
tree | bf2887c068e7845adb2b6b7060525f58d5d854c5 /httemplate | |
parent | b4191ff558b141b8f9a4374b0d3f0ce6312d4439 (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 427caca20..96e694ae3 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -419,6 +419,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. Tracked for informational purposes' ] if $curuser->access_right('Edit advertising sources') || $curuser->access_right('Edit global advertising sources'); @@ -457,7 +459,8 @@ $config_menu{'Fixed (username-less) 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'); tie my %menu, 'Tie::IxHash', |