[Bps-public-commit] r13922 - RT-BugTracker/html/Dist

ruz at bestpractical.com ruz at bestpractical.com
Wed Jul 9 14:57:27 EDT 2008


Author: ruz
Date: Wed Jul  9 14:57:26 2008
New Revision: 13922

Added:
   RT-BugTracker/html/Dist/Manage.html

Log:
* add first implementation of Manage.html 

Added: RT-BugTracker/html/Dist/Manage.html
==============================================================================
--- (empty file)
+++ RT-BugTracker/html/Dist/Manage.html	Wed Jul  9 14:57:26 2008
@@ -0,0 +1,65 @@
+<& /Elements/Header,
+    Title => $title,
+&>
+
+<& /Dist/Elements/Tabs, 
+    current_tab => '/Dist/Manage.html',
+    current_subtab => $current_subtab,
+    Queue => $Name,
+    Title => $title,
+&>
+
+<& /Elements/ListActions, actions => \@results &>
+
+<form action="<% $RT::WebPath %><% $m->request_comp->path %>" method="post">
+<input type="hidden" class="hidden" name="Queue" value="<% $QueueObj->Name %>" />
+
+<& /Dist/Elements/EditNotes, Queue => $QueueObj &>
+
+<& /Dist/Elements/EditNotifyAddresses, Queue => $QueueObj &>
+
+<& /Elements/Submit, Label => loc('Save Changes'), Name => 'Update' &>
+
+</form>
+<%INIT>
+$Name = $Queue unless $Name;
+$Name =~ s/::/-/g;
+my $QueueObj = RT::Queue->new( $session{CurrentUser} );
+$QueueObj->Load( $Name );
+unless ( $QueueObj->id ) {
+    $m->comp('/Public/Elements/ErrorNoDist', Queue => $Name, %ARGS);
+    $m->abort();
+}
+$ARGS{'Name'} = $Name = $QueueObj->Name;
+
+unless ( $QueueObj->IsAdminCc( $session{'CurrentUser'}->id )
+    || $QueueObj->CurrentUserHasRight('AdminQueue') )
+{
+    return $m->comp('/Elements/Error',
+        Why => loc("You're not allowed to manage queue for this distribution"),
+    );
+}
+
+my @results;
+foreach ( qw(Notes NotifyAddresses) ) {
+    push @results, $m->comp(
+        '/Dist/Elements/Edit'. $_ .':Process',
+        %ARGS,
+        Queue => $QueueObj,
+    );
+}
+
+my $title = loc( "Manage queue for [_1]", $Name );
+
+my $current_subtab = "Dist/Display.html"
+    ."&Queue=". $m->interp->apply_escapes($QueueObj->Name, 'u');
+
+my ($base_url) = ( $current_subtab =~ m{^Dist/(.+)$} );
+$base_url .= '&';
+
+</%INIT>
+<%ARGS>
+$Name   => undef
+# Queue is an alias for Name, Name has higher precendance
+$Queue  => undef
+</%ARGS>



More information about the Bps-public-commit mailing list