[Rt-commit] r3473 - in rt/branches/3.5-TESTING: . html/Approvals
html/Approvals/Elements html/NoAuth/css
trs at bestpractical.com
trs at bestpractical.com
Thu Jul 14 06:46:54 EDT 2005
Author: trs
Date: Thu Jul 14 06:46:52 2005
New Revision: 3473
Modified:
rt/branches/3.5-TESTING/ (props changed)
rt/branches/3.5-TESTING/html/Approvals/Display.html
rt/branches/3.5-TESTING/html/Approvals/Elements/Approve
rt/branches/3.5-TESTING/html/Approvals/Elements/PendingMyApproval
rt/branches/3.5-TESTING/html/NoAuth/css/body.css
Log:
r4986 at wintermute: tom | 2005-07-13 21:45:29 -0400
Styled approvals and made the approval display much more semantic
Modified: rt/branches/3.5-TESTING/html/Approvals/Display.html
==============================================================================
--- rt/branches/3.5-TESTING/html/Approvals/Display.html (original)
+++ rt/branches/3.5-TESTING/html/Approvals/Display.html Thu Jul 14 06:46:52 2005
@@ -53,9 +53,7 @@
<&| /Widgets/TitleBox, title => $title &>
<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
<hr>
-<table width="100%">
<& Elements/Approve, ticket => $Ticket, ShowApproving => 0 &>
-</table>
</&>
<& /Elements/Submit&>
</form>
Modified: rt/branches/3.5-TESTING/html/Approvals/Elements/Approve
==============================================================================
--- rt/branches/3.5-TESTING/html/Approvals/Elements/Approve (original)
+++ rt/branches/3.5-TESTING/html/Approvals/Elements/Approve Thu Jul 14 06:46:52 2005
@@ -43,36 +43,44 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr bgcolor="#b9b9ff">
-<td colspan=2><font size="3">
-<a href="<%$RT::WebPath%>/Approvals/Display.html?id=<%$ticket->Id%>"><% loc("#[_1]: [_2]", $ticket->Id, $ticket->Subject) %></a> (<%loc($ticket->Status)%>)</font></td>
-</tr>
+<div class="approval">
+ <div class="name">
+ <a href="<%$RT::WebPath%>/Approvals/Display.html?id=<%$ticket->Id%>"><% loc("#[_1]: [_2]", $ticket->Id, $ticket->Subject) %></a> (<%loc($ticket->Status)%>)</font>
+ </div>
% if ($ShowApproving) {
% foreach my $approving ( $ticket->AllDependedOnBy( Type => 'ticket' ) ) {
-<tr bgcolor="#e9e9e9">
-<td colspan=2>
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<% $approving->Id %>"><&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1]</&></a>
-</td>
-</tr>
-<tr><td colspan=2>
-<& /Ticket/Elements/ShowCustomFields, Ticket => $approving &>
-<& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
-</td></tr>
+ <div class="originating-ticket">
+ <span class="link"><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<% $approving->Id %>"><&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1]</&></a></span>
+ <div class="info">
+ <& /Ticket/Elements/ShowCustomFields, Ticket => $approving &>
+ <& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
+ </div>
+ </div>
% }
% }
-<tr <%$class && "class=\"$class\""%>>
-<td valign=top>
-<input type="radio" class="radio" name="Approval-<%$ticket->Id%>-Action" value="approve"><&|/l&>Approve</&><br>
-<input type="radio" class="radio" name="Approval-<%$ticket->Id%>-Action" value="deny"><&|/l&>Deny</&><br>
-<input type="radio" class="radio" name="Approval-<%$ticket->Id%>-Action" value="none" checked><&|/l&>No action</&>
-</td>
-<td>
-<&|/l&>Notes</&><br>
-<textarea name="Approval-<%$ticket->Id%>-Notes" rows=2 cols=70></textarea>
-</td>
-</tr>
+ <div class="form">
+ <div class="action">
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-approve" name="Approval-<%$ticket->Id%>-Action" value="approve" />
+ <label for="Approval-<%$ticket->Id%>-Action-approve"><&|/l&>Approve</&></label>
+ </div>
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-deny" name="Approval-<%$ticket->Id%>-Action" value="deny" />
+ <label for="Approval-<%$ticket->Id%>-Action-deny"><&|/l&>Deny</&></label>
+ </div>
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-none" name="Approval-<%$ticket->Id%>-Action" value="none" checked="checked" />
+ <label for="Approval-<%$ticket->Id%>-Action-none"><&|/l&>No action</&></label>
+ </div>
+ </div>
+ <div class="notes">
+ <label for="Approval-<%$ticket->Id%>-Notes"><&|/l&>Notes</&></label>
+ <textarea name="Approval-<%$ticket->Id%>-Notes" id="Approval-<%$ticket->Id%>-Notes" rows="2" cols="70"></textarea>
+ </div>
+ <div class="clear"></div>
+ </div>
+</div>
<%ARGS>
$ShowApproving => 1
$ticket => undef
-$class => undef
</%ARGS>
Modified: rt/branches/3.5-TESTING/html/Approvals/Elements/PendingMyApproval
==============================================================================
--- rt/branches/3.5-TESTING/html/Approvals/Elements/PendingMyApproval (original)
+++ rt/branches/3.5-TESTING/html/Approvals/Elements/PendingMyApproval Thu Jul 14 06:46:52 2005
@@ -43,19 +43,18 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table width="100%">
-% my ($i, $class);
+<script type="text/javascript"><!--
+ onLoadHook('createCalendarLink("CreatedBefore");');
+ onLoadHook('createCalendarLink("CreatedAfter");');
+--></script>
% my %done;
% foreach ($tickets, $group_tickets) {
% while (my $ticket = $_->Next() ) {
% next if !$ARGS{'ShowDependent'} and $ticket->HasUnresolvedDependencies( Type => 'approval' );
% next if $done{$ticket->Id}++; # don't show duplicate tickets
-% $i++;
-% $class = ($i%2) ? "oddline" : "evenline";
-<& Approve, ticket => $ticket, class => $class &>
+<& Approve, ticket => $ticket &>
% }
% }
-</table>
<&| /Widgets/TitleBox, title => loc("Search for approvals") &>
<input type="checkbox" class="checkbox" value="1" name="ShowPending"
@@ -66,9 +65,9 @@
<input type="checkbox" class="checkbox" value="1" name="ShowRejected" <%$ARGS{'ShowRejected'} && "checked"%>> <&|/l&>Show denied requests</&><br>
<input type="checkbox" class="checkbox" value="1" name="ShowDependent" <%$ARGS{'ShowDependent'} && "checked"%>> <&|/l&>Show requests awaiting other approvals</&><br>
-<&|/l,"<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore'>"&>Only show approvals for requests created before [_1]</&><br>
+<&|/l,"<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore' id='CreatedBefore'>"&>Only show approvals for requests created before [_1]</&><br>
-<&|/l, "<input size='15' value='".( $created_after->Unix >0 && $created_after->ISO)."' name='CreatedAfter'>"&>Only show approvals for requests created after [_1]</&>
+<&|/l, "<input size='15' value='".( $created_after->Unix >0 && $created_after->ISO)."' name='CreatedAfter' id='CreatedAfter'>"&>Only show approvals for requests created after [_1]</&>
</&>
<%init>
Modified: rt/branches/3.5-TESTING/html/NoAuth/css/body.css
==============================================================================
--- rt/branches/3.5-TESTING/html/NoAuth/css/body.css (original)
+++ rt/branches/3.5-TESTING/html/NoAuth/css/body.css Thu Jul 14 06:46:52 2005
@@ -177,3 +177,54 @@
#body :link:hover, #body :visited:hover {
text-decoration: underline;
}
+
+.approval {
+ margin-bottom: 3em;
+ padding: 0 0 1em 0;
+ border: 1px solid #069;
+}
+
+.approval .name {
+ background: #069;
+ color: white;
+ font-size: 1.1em;
+ padding: 0.2em 0 0.4em 0.2em;
+}
+
+#body .approval .name :link, #body .approval .name :visited {
+ color: white;
+}
+
+.approval .originating-ticket {
+ margin: 0.5em;
+ border: 1px solid #aaa;
+}
+
+.approval .originating-ticket .link {
+ display: block;
+ background: #aaa;
+ padding: 0.2em 0 0.4em 0.2em;
+}
+
+.approval .originating-ticket .info {
+ padding: 0.5em;
+}
+
+#body .approval .originating-ticket .link :link,
+#body .approval .originating-ticket .link :visited {
+ color: black;
+}
+
+.approval .form {
+ margin: 1em 0.5em 0.5em 0.5em;
+}
+
+.approval .form .action, .approval .form .notes {
+ float: left;
+ margin-left: 1em;
+}
+
+.approval .form .action { padding-top: 1em; }
+
+.approval .form .action label { font-weight: normal; }
+.approval .form .notes label { display: block; }
More information about the Rt-commit
mailing list