diff options
Diffstat (limited to 'rt/html/Admin/Global')
-rw-r--r-- | rt/html/Admin/Global/CustomField.html | 61 | ||||
-rw-r--r-- | rt/html/Admin/Global/CustomFields.html | 47 | ||||
-rw-r--r-- | rt/html/Admin/Global/GroupRights.html | 99 | ||||
-rw-r--r-- | rt/html/Admin/Global/Scrip.html | 56 | ||||
-rw-r--r-- | rt/html/Admin/Global/Scrips.html | 53 | ||||
-rw-r--r-- | rt/html/Admin/Global/Template.html | 101 | ||||
-rw-r--r-- | rt/html/Admin/Global/Templates.html | 53 | ||||
-rw-r--r-- | rt/html/Admin/Global/UserRights.html | 77 | ||||
-rw-r--r-- | rt/html/Admin/Global/index.html | 64 |
9 files changed, 611 insertions, 0 deletions
diff --git a/rt/html/Admin/Global/CustomField.html b/rt/html/Admin/Global/CustomField.html new file mode 100644 index 000000000..0974af538 --- /dev/null +++ b/rt/html/Admin/Global/CustomField.html @@ -0,0 +1,61 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/CustomFields.html', + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => $title &> + +<& /Admin/Elements/EditCustomField, title => $title, %ARGS &> + +<%INIT> +my ($title, $current_subtab); + +my $subtabs = { + A => { title => loc('Select custom field'), + path => "Admin/Global/CustomFields.html" + }, + B => { title => loc('New custom field'), + path => "Admin/Global/CustomField.html?create=1&Queue=0", + separator => 1, + } + }; +if ( $ARGS{'create'} ) { + $current_subtab = "Admin/Global/CustomField.html?create=1&Queue=0"; + $title = loc('Create a CustomField which applies to all queues'); +} +else { + $current_subtab = + "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0"; + $title = loc('Modify a CustomField which applies to all queues'); + $subtabs->{"C"} = { + title => loc( 'Custom Field #[_1]', $CustomField ), + path => "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0" + }; +} +</%INIT> +<%ARGS> +$CustomField => undef +</%ARGS> diff --git a/rt/html/Admin/Global/CustomFields.html b/rt/html/Admin/Global/CustomFields.html new file mode 100644 index 000000000..f6bbddfed --- /dev/null +++ b/rt/html/Admin/Global/CustomFields.html @@ -0,0 +1,47 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/CustomFields.html', + current_subtab => 'Admin/Global/CustomFields.html', + subtabs => $subtabs, + Title => $title &> + +<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &> + +<%INIT> +my $subtabs = { + A => { title => loc('Select custom field'), + path => "Admin/Global/CustomFields.html" + }, + B => { title => loc('New custom field'), + path => "Admin/Global/CustomField.html?create=1&Queue=0", + separator => 1, + } + }; +my $title = loc("Modify Custom Fields which apply to all queues"); +</%INIT> +<%ARGS> +$id => undef +</%ARGS> diff --git a/rt/html/Admin/Global/GroupRights.html b/rt/html/Admin/Global/GroupRights.html new file mode 100644 index 000000000..150e83f43 --- /dev/null +++ b/rt/html/Admin/Global/GroupRights.html @@ -0,0 +1,99 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => loc('Modify global group rights') &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/GroupRights.html', + Title => loc('Modify global group rights') &> +<& /Elements/ListActions, actions => \@results &> + + <FORM METHOD=POST ACTION="GroupRights.html"> + +<& /Elements/TitleBoxStart, title => loc('Modify global group rights.')&> + +<h1><&|/l&>System groups</&></h1> +<TABLE> +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToSystemInternalGroups(); +% while (my $Group = $Groups->Next()) { + <TR ALIGN=RIGHT> + <TD VALIGN=TOP> + <% loc($Group->Type) %> + </TD> + <TD> + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object =>$RT::System &> + </TD> + </TR> +% } +</TABLE> +<h1><&|/l&>Roles</&></h1> +<TABLE> +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToRolesForSystem(); +% while (my $Group = $Groups->Next()) { + <TR ALIGN=RIGHT> + <TD VALIGN=TOP> + <% loc($Group->Type) %> + </TD> + <TD> + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $RT::System &> + </TD> + </TR> +% } +</TABLE> +<h1><&|/l&>User defined groups</&></h1> +<TABLE> +% $Groups = RT::Groups->new($session{'CurrentUser'}); +% $Groups->LimitToUserDefinedGroups(); +% while (my $Group = $Groups->Next()) { + <TR ALIGN=RIGHT> + <TD VALIGN=TOP> + <% $Group->Name %> + </TD> + <TD> + <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, + Object => $RT::System &> + </TD> + </TR> +% } +</TABLE> + + <& /Elements/TitleBoxEnd &> + <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> + + </FORM> + +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + + +my $Groups; + +</%INIT> + +<%ARGS> +</%ARGS> diff --git a/rt/html/Admin/Global/Scrip.html b/rt/html/Admin/Global/Scrip.html new file mode 100644 index 000000000..8b9cf6db6 --- /dev/null +++ b/rt/html/Admin/Global/Scrip.html @@ -0,0 +1,56 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/Scrips.html', + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => $title &> + +<& /Admin/Elements/EditScrip, title => $title, %ARGS &> + +<%init> +my ($title, $current_subtab); +my $subtabs = { + A => { title => loc('Select scrip'), + path => "Admin/Global/Scrips.html", + }, + B => { title => loc('New scrip'), + path => "Admin/Global/Scrip.html?create=1&Queue=0", + separator => 1, + } + }; + +if ($ARGS{'id'}) { + $current_subtab = "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0"; + $title = loc("Modify a scrip which applies to all queues"); + $subtabs->{"C"} = { title => loc('Scrip #[_1]', $ARGS{'id'}), + path => "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0" + } +} +else { + $current_subtab = "Admin/Global/Scrip.html?create=1&Queue=0"; + $title = loc("Add a scrip which will apply to all queues"); +} +</%init> diff --git a/rt/html/Admin/Global/Scrips.html b/rt/html/Admin/Global/Scrips.html new file mode 100644 index 000000000..763198015 --- /dev/null +++ b/rt/html/Admin/Global/Scrips.html @@ -0,0 +1,53 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/Scrips.html', + current_subtab => 'Admin/Global/Scrips.html', + subtabs => $subtabs, + Title => $title &> +<& /Admin/Elements/EditScrips, title => $title, id => $id, %ARGS &> +</form> +<%init> + +my $subtabs = { + A => { title => loc('Select scrip'), + path => "Admin/Global/Scrips.html", + }, + B => { title => loc('New scrip'), + path => "Admin/Global/Scrip.html?create=1&Queue=0", + separator => 1, + } + }; +my $title = loc("Modify scrips which apply to all queues"); + +my (@actions); + +</%init> + + + +<%ARGS> +$id => 0 +</%ARGS> diff --git a/rt/html/Admin/Global/Template.html b/rt/html/Admin/Global/Template.html new file mode 100644 index 000000000..71f77e9dd --- /dev/null +++ b/rt/html/Admin/Global/Template.html @@ -0,0 +1,101 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => loc("Modify template [_1]", $TemplateObj->id) &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/Templates.html', + current_subtab => $current_subtab, + subtabs => $subtabs, + Title => loc("Modify template [_1]", $TemplateObj->id) &> +<& /Elements/ListActions, actions => \@results &> + + +<FORM METHOD=POST ACTION="Template.html"> +%if ($Create ) { +<INPUT TYPE=HIDDEN NAME="Template" VALUE="new"> +% } else { +<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>"> +% } + +%# hang onto the queue id +<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>"> + +<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => $TemplateObj->Description, Content => $TemplateObj->Content &> + +<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> +</FORM> + + + +<%INIT> + +my $TemplateObj = new RT::Template($session{'CurrentUser'}); +my ($title, @results, $current_subtab); + +my $subtabs = { + A => { title => loc('Select template'), + path => "Admin/Global/Templates.html" + }, + B => { title => loc('New template'), + path => "Admin/Global/Template.html?Create=1&Queue=0", + separator => 1, + } + }; + + +if ($Create) { + $current_subtab = "Admin/Global/Template.html?Create=1&Queue=0"; + $title = loc("Create a template"); +} + +else { + if ($Template eq 'new') { + my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name); + Abort(loc("Could not create template: [_1]", $msg)) unless ($val); + push @results, $msg; + } + else { + $TemplateObj->Load($Template) || Abort(loc('No Template')); + } + $title = loc('Modify template [_1]', loc($TemplateObj->Name())); + + +} +if ($TemplateObj->Id()) { + my @attribs = qw( Description Content Queue Name); + my @aresults = UpdateRecordObject( AttributesRef => \@attribs, + Object => $TemplateObj, + ARGSRef => \%ARGS); + $current_subtab = "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id(); + $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()), + path => "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id(), + }; + push @results, @aresults; +} +</%INIT> +<%ARGS> +$Queue => undef +$Template => undef +$Create => undef +$Name => undef +</%ARGS> diff --git a/rt/html/Admin/Global/Templates.html b/rt/html/Admin/Global/Templates.html new file mode 100644 index 000000000..77aab0730 --- /dev/null +++ b/rt/html/Admin/Global/Templates.html @@ -0,0 +1,53 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/Templates.html', + current_subtab => 'Admin/Global/Templates.html', + subtabs => $subtabs, + Title => $title &> +<& /Admin/Elements/EditTemplates, title => $title, %ARGS &> +</form> +<%init> + +my $subtabs = { + A => { title => loc('Select template'), + path => "Admin/Global/Templates.html" + }, + B => { title => loc('New template'), + path => "Admin/Global/Template.html?Create=1&Queue=0", + separator => 1, + } + }; +my $title = loc("Modify templates which apply to all queues"); + +my (@actions); + +</%init> + + + +<%ARGS> +$id => undef +</%ARGS> diff --git a/rt/html/Admin/Global/UserRights.html b/rt/html/Admin/Global/UserRights.html new file mode 100644 index 000000000..aee82d1f4 --- /dev/null +++ b/rt/html/Admin/Global/UserRights.html @@ -0,0 +1,77 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Admin/Elements/Header, Title => loc('Modify global user rights') &> +<& /Admin/Elements/SystemTabs, + current_tab => 'Admin/Global/UserRights.html', + Title => loc('Modify global user rights') &> +<& /Elements/ListActions, actions => \@results &> + + <FORM METHOD=POST ACTION="UserRights.html"> + +<& /Elements/TitleBoxStart, title => loc('Modify global user rights.') &> + +<TABLE> + +% while (my $Member = $Users->Next()) { +% my $UserObj = $Member->MemberObj->Object(); +% my $group = RT::Group->new($session{'CurrentUser'}); +% $group->LoadACLEquivalenceGroup($Member->MemberObj); + <TR ALIGN=RIGHT> + <TD VALIGN=TOP> + <% $UserObj->Name %> + </TD> + <TD> + <& /Admin/Elements/SelectRights, PrincipalId => $group->PrincipalId, + Object => $RT::System &> + </TD> + </TR> +% } +</TABLE> + + <& /Elements/TitleBoxEnd &> + <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> + + </FORM> + +<%INIT> + + #Update the acls. + my @results = ProcessACLChanges(\%ARGS); + +# {{{ Deal with setting up the display of current rights. + + +# Find out which users we want to display ACL selects for +my $Privileged = RT::Group->new($session{'CurrentUser'}); +$Privileged->LoadSystemInternalGroup('Privileged'); +my $Users = $Privileged->MembersObj(); + + + +# }}} + +</%INIT> + +<%ARGS> +</%ARGS> diff --git a/rt/html/Admin/Global/index.html b/rt/html/Admin/Global/index.html new file mode 100644 index 000000000..1749f4ffb --- /dev/null +++ b/rt/html/Admin/Global/index.html @@ -0,0 +1,64 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Callback, tabs => $tabs, %ARGS &> +<& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &> +<& /Admin/Elements/SystemTabs, + Title => loc('Admin/Global configuration') &> + +<ul> +% foreach my $key (sort keys %$tabs) { +<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br> +<% $tabs->{$key}{text} %> +</li> +% } +</ul> + +<%INIT> + my $tabs = { + + A => { title => loc('Scrips'), + text => loc('Modify scrips which apply to all queues'), + path => 'Scrips.html', + }, + B => { title => loc('Templates'), + text => loc('Edit system templates'), + path => 'Templates.html', + }, + + F => { title => loc('Custom Fields'), + text => loc('Modify Custom Fields which apply to all queues'), + path => 'CustomFields.html', + }, + + G => { title => loc('Group Rights'), + text => loc('Modify global group rights'), + path => 'GroupRights.html', + }, + H => { title => loc('User Rights'), + text => loc('Modify global user rights'), + path => 'UserRights.html', + } + +}; +</%INIT> |