[Bps-public-commit] rt-extension-timetracking branch, 4.6-theme, created. 0.09-11-ga8c7d93
? sunnavy
sunnavy at bestpractical.com
Fri Sep 6 13:04:43 EDT 2019
The branch, 4.6-theme has been created
at a8c7d93587746d279991fea98a8c45dbe5fee006 (commit)
- Log -----------------------------------------------------------------
commit a8c7d93587746d279991fea98a8c45dbe5fee006
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Sep 7 01:03:57 2019 +0800
Migrate to 4.6 theme
diff --git a/html/Callbacks/RT-Extension-TimeTracking/Ticket/Elements/ShowBasics/EndOfList b/html/Callbacks/RT-Extension-TimeTracking/Ticket/Elements/ShowBasics/EndOfList
index d0d26fa..96732db 100644
--- a/html/Callbacks/RT-Extension-TimeTracking/Ticket/Elements/ShowBasics/EndOfList
+++ b/html/Callbacks/RT-Extension-TimeTracking/Ticket/Elements/ShowBasics/EndOfList
@@ -32,49 +32,29 @@ my $cf_name = 'Object-RT::Transaction--CustomField-'
my $today = RT::Date->new($session{CurrentUser});
$today->SetToNow();
-# Escape : so id declaration is parsed properly
-my $cf_style = $cf_name;
-$cf_style =~ s/:/\\:/g;
-
</%init>
-<style type="text/css">
-input#<% $cf_style %> {
- width: 85px;
-}
-</style>
-<tr>
- <td class="label"><&|/l&>Add to time</&><br /><&|/l&>worked:</&></td>
- <td class="value">
+<div class="add-time form-row">
+ <div class="col-md-3 label"><&|/l&>Add to time</&> <&|/l&>worked:</&></div>
+ <div class="col-md-auto value">
<form action="<% RT->Config->Get("WebPath") %>/Ticket/Display.html" method="POST">
<input type="hidden" name="id" value="<% $TicketObj->id %>">
- <& /Elements/SelectDate, Name => "$cf_name", current => 0, ShowTime => 0, Default => $today->Date( Timezone => 'user') &>
- <& /Elements/EditTimeValue,
- Name => "UpdateTimeWorked",
- Default => $ARGS{UpdateTimeWorked} || '',
- InUnits => $ARGS{'UpdateTimeWorked-TimeUnits'} || 'minutes',
- &>
- <input type="submit" value="<% loc('Add') %>">
+ <div class="form-row">
+ <div class="col-md-auto">
+ <& /Elements/SelectDate, Name => "$cf_name", current => 0, ShowTime => 0, Default => $today->Date( Timezone => 'user') &>
+ </div>
+ <div class="col-md-auto">
+ <input name="UpdateTimeWorked" type="text" value="<% $ARGS{UpdateTimeWorked} || '' %>" size="5" class="form-control" />
+ </div>
+ <div class="col-md-auto">
+ <& /Elements/SelectTimeUnits, Name => 'UpdateTimeWorked-TimeUnits', Default => $ARGS{'UpdateTimeWorked-TimeUnits'} || 'minutes' &>
+ </div>
+ <div class="col-md-auto">
+ <input type="submit" class="btn btn-primary form-control" value="<% loc('Add') %>">
+ </div>
+ </div>
</form>
- </td>
-</tr>
-
-% # Render if less than RT 4.4.0, (which includes per user time)
-% if ( RT::Handle::cmp_version($RT::VERSION,'4.4.0') < 0 && $TicketObj->TimeWorked ) {
-<tr class="time worked">
- <td class="label"><&|/l&>Worked</&>:</td>
- <td>
- <table>
-% for my $user ( keys %$time_worked ) {
- <tr>
-% # add "value" class for $user label is to make the font the same size as value
- <td class="value"><% $user %>:</td>
- <td class="value"><& /Ticket/Elements/ShowTime, minutes => $time_worked->{$user} &></td>
- </tr>
-% }
- </table>
- </td>
-</tr>
-% }
+ </div>
+</div>
<%args>
$TicketObj
diff --git a/html/Tools/MyWeek.html b/html/Tools/MyWeek.html
index 138b79d..7e5b248 100644
--- a/html/Tools/MyWeek.html
+++ b/html/Tools/MyWeek.html
@@ -24,45 +24,56 @@ jQuery( function() {
</script>
<style type="text/css">
-input#Date {
- width: 177px;
+table.ticket-list.collection-as-table.table td {
+ vertical-align: middle;
}
+
.week-links a {
text-decoration: underline;
}
-.week-links td:last-child{
- text-align: right;
+
+div.day_entry {
+ margin-top: 2em;
}
</style>
<div class="time_tracking">
<form>
% if ( $DefaultTimeUnits ) {
-<input type="hidden" value="<% $DefaultTimeUnits %>" name="DefaultTimeUnits" />
+ <input type="hidden" value="<% $DefaultTimeUnits %>" name="DefaultTimeUnits" />
% }
-<table>
% if ( $session{CurrentUser}->HasRight( Object => $RT::System, Right => 'AdminTimesheets' )) {
-<div>
-<tr><td class="label">
-<input type="hidden" name="User" value="<% $User || '' %>" />
-<&|/l&>Go to user</&>:</td>
-<td class="value"><input type="text" name="UserString" value="" data-autocomplete="Users" data-autocomplete-return="Name" data-autocomplete-privileged=1 id="autocomplete-User" /></td>
-</tr>
-</div>
+ <input type="hidden" name="User" value="<% $User || '' %>" />
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Go to user</&>:
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="UserString" value="" data-autocomplete="Users" data-autocomplete-return="Name" data-autocomplete-privileged=1 id="autocomplete-User" />
+ </div>
+ </div>
% }
-<tr><td class="label">
-<&|/l&>Week of (pick any day in week)</&>:</td>
-<td class="value"><& /Elements/SelectDate, ShowTime => 0, Name => 'Date', Default => $date->Date(Format=>'ISO', Timezone => 'user') &></td></tr>
-<tr class="week-links">
- <td><a href='#' id='previous-week'><< Previous Week</a></td>
- <td><a href='#' id='next-week'>Next Week >></a></td>
-</tr>
-</table>
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Week of (pick any day in week)</&>:
+ </div>
+ <div class="col-md-auto value">
+ <& /Elements/SelectDate, ShowTime => 0, Name => 'Date', Default => $date->Date(Format=>'ISO', Timezone => 'user') &>
+ </div>
+ </div>
+ <div class="week-links form-row">
+ <div class="col-md-6">
+ <a href='#' id='previous-week'><< Previous Week</a>
+ </div>
+ <div class="col-md-6 text-right">
+ <a href='#' id='next-week'>Next Week >></a>
+ </div>
+ </div>
</form>
% for my $day ( sort keys %week_worked ) {
<div class="day_entry">
-<h2><% $week_worked{$day}{date}->RFC2822(Time => 0, Timezone => 'user') %></h2>
+<h4><% $week_worked{$day}{date}->RFC2822(Time => 0, Timezone => 'user') %></h4>
% if ( %{$week_worked{$day}{tickets}} ) {
<form method="POST">
@@ -70,7 +81,7 @@ input#Date {
% if ( $user->id != $session{CurrentUser}->id ) {
<input type="hidden" value="<% $session{CurrentUser}->id %>" name="Object-RT::Transaction--CustomField-<% $actor_cf->id %>-Values" />
% }
-<table class="ticket-list collection-as-table">
+<table class="ticket-list collection-as-table table">
<tr class="collection-as-table">
<th class="collection-as-table"><&|/l&>id</&></th>
<th class="collection-as-table"><&|/l&>Subject</&></th>
@@ -113,7 +124,7 @@ input#Date {
% } # end for my $day
</table>
<div class="submit_day_time_button">
-<input type="submit" class="button" value="Save <% $week_worked{$day}{week_name} %> Updates">
+<input type="submit" class="button btn btn-primary form-control" value="Save <% $week_worked{$day}{week_name} %> Updates">
</div>
</form>
<div class="time_worked_day">
@@ -126,14 +137,23 @@ input#Date {
% if ( $user->id != $session{CurrentUser}->id ) {
<input type="hidden" value="<% $session{CurrentUser}->id %>" name="Object-RT::Transaction--CustomField-<% $actor_cf->id %>-Values" />
% }
- <&|/l&>Add ticket</&>: <input name="id" type="text" size="8" data-autocomplete="Tickets" />
- <&|/l&>Time Worked</&>:
- <& /Elements/EditTimeValue,
- Name => "UpdateTimeWorked",
- Default => '',
- InUnits => $DefaultTimeUnits || 'minutes',
- &>
- <input type="submit" class="button" value="<% loc('Add') %>">
+ <div class="form-row">
+ <div class="col-md-auto label">
+ <&|/l&>Add ticket</&>:
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control" name="id" type="text" size="8" data-autocomplete="Tickets" />
+ </div>
+ <div class="col-md-auto">
+ <input name="UpdateTimeWorked" type="text" size="5" class="form-control" />
+ </div>
+ <div class="col-md-auto">
+ <& /Elements/SelectTimeUnits, Name => 'UpdateTimeWorked-TimeUnits', Default => $DefaultTimeUnits || 'minutes' &>
+ </div>
+ <div class="col-md-auto">
+ <input type="submit" class="button btn btn-primary form-control" value="<% loc('Add') %>">
+ </div>
+ </div>
</form>
</div></div>
% }
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list