[Bps-public-commit] rt-extension-mobileui branch, master, updated. 3344b7896105be5ac2d721f178ac6ba7a0c4f129

Jesse Vincent jesse at bestpractical.com
Thu Aug 5 13:54:09 EDT 2010


The branch, master has been updated
       via  3344b7896105be5ac2d721f178ac6ba7a0c4f129 (commit)
       via  0bdec92e22ce65a4b6c7a255b1dfb7e152383f2e (commit)
       via  47549639b720f6b91c9045496a5859429d37747d (commit)
      from  fcf281b155e7a33eae05f15d04aa7e4c5e034631 (commit)

Summary of changes:
 html/m/_elements/menu        |   13 +++++---
 html/m/_elements/raw_style   |   60 ++++++++++++++++++++++++++++++++---------
 html/m/_elements/ticket_list |    5 +++-
 html/m/ticket/show           |   25 ++++++++---------
 html/m/tickets/all           |    4 ---
 html/m/tickets/owned         |    4 ---
 html/m/tickets/search        |   42 +++++++++++++++++++++++++++++
 7 files changed, 113 insertions(+), 40 deletions(-)
 delete mode 100644 html/m/tickets/all
 delete mode 100644 html/m/tickets/owned

- Log -----------------------------------------------------------------
commit 47549639b720f6b91c9045496a5859429d37747d
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu Aug 5 09:11:26 2010 -0700

    actually link the ShowTime component correctly in show.

diff --git a/html/m/ticket/show b/html/m/ticket/show
index 29d20f4..f047e65 100644
--- a/html/m/ticket/show
+++ b/html/m/ticket/show
@@ -171,19 +171,19 @@ my $print_value = sub {
 % if ($Ticket->TimeEstimated) {
  <div class="entry">
     <div class="label time estimated"><&|/l&>Estimated</&>:</div>
-    <div class="value time estimated"><& ShowTime, minutes => $Ticket->TimeEstimated &></div>
+    <div class="value time estimated"><& /Ticket/Elements/ShowTime, minutes => $Ticket->TimeEstimated &></div>
   </div>
 % }
 % if ($Ticket->TimeWorked) {
  <div class="entry">
     <div class="label time worked"><&|/l&>Worked</&>:</div>
-    <div class="value time worked"><& ShowTime, minutes => $Ticket->TimeWorked &></div>
+    <div class="value time worked"><& /Ticket/Elements/ShowTime, minutes => $Ticket->TimeWorked &></div>
   </div>
 % }
 % if ($Ticket->TimeLeft) {
  <div class="entry">
     <div class="label time left"><&|/l&>Left</&>:</div>
-    <div class="value time left"><& ShowTime, minutes => $Ticket->TimeLeft &></div>
+    <div class="value time left"><& /Ticket/Elements/ShowTime, minutes => $Ticket->TimeLeft &></div>
   </div>
 % }
  <div class="entry">

commit 0bdec92e22ce65a4b6c7a255b1dfb7e152383f2e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu Aug 5 10:06:41 2010 -0700

    Better saved search handling, dealing with issues pointed out by alex
    and kevin

diff --git a/html/m/_elements/menu b/html/m/_elements/menu
index adcf8fd..e13c1c7 100644
--- a/html/m/_elements/menu
+++ b/html/m/_elements/menu
@@ -24,14 +24,17 @@ my @menu = (
     {   label => loc("New ticket"),
         url   => '/m/ticket/select_create_queue',
     },
-    {   label => loc("My tickets"),
-        url   => '/m/tickets/owned'
+    {   label => loc("Bookmarked tickets"),
+        url   => '/m/tickets/search?name=Bookmarked%20Tickets',
     },
-    {   label => loc("My requests"),
-        url   => '/m/tickets/requested'
+    {   label => loc("Tickets I own"),
+        url   => '/m/tickets/search?name=My%20Tickets',
+    },
+    {   label => loc("Unowned tickets"),
+        url   => '/m/tickets/search?name=Unowned%20Tickets',
     },
     {   label => loc("All tickets"),
-        url   => '/m/tickets/all'
+        url   => '/m/tickets/search?query=id!%3d0&order_by=id&order=DESC'
     },
 );
 
diff --git a/html/m/tickets/all b/html/m/tickets/all
deleted file mode 100644
index b17bc29..0000000
--- a/html/m/tickets/all
+++ /dev/null
@@ -1,4 +0,0 @@
-<%init>
- $m->comp('../_elements/ticket_list', %ARGS, query => 'id > 0' );
-$m->abort();
-</%init>
diff --git a/html/m/tickets/owned b/html/m/tickets/owned
deleted file mode 100644
index 00d63f4..0000000
--- a/html/m/tickets/owned
+++ /dev/null
@@ -1,4 +0,0 @@
-<%init>
- $m->comp('../_elements/ticket_list', %ARGS, query => 'Owner = "'.$session{CurrentUser}->Name.'" AND (Status != "resolved" AND Status != "rejected" AND Status != "stalled")'); 
-$m->abort();
-</%init>
diff --git a/html/m/tickets/search b/html/m/tickets/search
index c9a0b00..16864b4 100644
--- a/html/m/tickets/search
+++ b/html/m/tickets/search
@@ -2,6 +2,7 @@
 $page => 1
 $order_by => 'id'
 $order => 'desc'
+$name => undef
 </%args>
 <%init>
 use RT::Search::Googleish;
@@ -17,6 +18,47 @@ if ($ARGS{'q'}) {
 
 }
 
+elsif ($ARGS{'name'}) {
+my $search_arg;
+
+my $search;
+
+    if ($name)  {
+        ($search) = RT::System->new( $session{'CurrentUser'} )->Attributes->Named( 'Search - ' . $name );
+        unless ( $search && $search->Id ) {
+            my (@custom_searches) = RT::System->new( $session{'CurrentUser'} )->Attributes->Named('SavedSearch');
+            foreach my $custom (@custom_searches) {
+                if ( $custom->Description eq $name ) { $search = $custom; last }
+            }
+            unless ( $search && $search->id ) {
+                $m->out("Predefined search $name not found");
+                return;
+            }
+        }
+
+        $search_arg = $session{'CurrentUser'}->UserObj->Preferences( $search, $search->Content );
+    }
+
+    foreach ($search_arg) {
+        if ( $_->{'Query'} =~ /__Bookmarks__/ ) {
+            $_->{'Rows'} = 999;
+
+            # DEPRECATED: will be here for a while up to 3.10/4.0
+            my $bookmarks = $session{'CurrentUser'}->UserObj->FirstAttribute('Bookmarks');
+            $bookmarks = $bookmarks->Content if $bookmarks;
+            $bookmarks ||= {};
+            my $query = join( " OR ", map " id = '$_' ", grep $bookmarks->{$_}, keys %$bookmarks ) || 'id=0';
+            $_->{'Query'} =~ s/__Bookmarks__/( $query )/g;
+        }
+    }
+
+    $query    = $search_arg->{Query};
+    $order_by = $search_arg->{OrderBy};
+    $order    = $search_arg->{Order};
+
+}
+
+
 $m->comp('../_elements/ticket_list', query => $query, page => $page, order_by => $order_by, order => $order);
 $m->abort();
 </%init>

commit 3344b7896105be5ac2d721f178ac6ba7a0c4f129
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu Aug 5 10:55:44 2010 -0700

    ui hacking

diff --git a/html/m/_elements/raw_style b/html/m/_elements/raw_style
index cabe966..4c624ca 100644
--- a/html/m/_elements/raw_style
+++ b/html/m/_elements/raw_style
@@ -109,7 +109,7 @@ hr.clear {
 }
 .value { 
     font-weight: bold;
-    width: 100%;
+    display:inline-block;
 }
 
 ul.ticketlist {
@@ -133,20 +133,33 @@ ul.ticketlist li.ticket:first-child {
 }
 
 ul.ticketlist li.ticket a.ticket{
+    display: inline-block;
     font-size: 1.3em;
+    width: 100%;
+    padding: 0.5em;
+    padding-bottom: 5em;
+    margin-bottom: -5em;
+    border: 1px solid blue;
+}
+ul.ticketlist li.ticket div.metadata {
 }
 
-ul.ticketlist li.ticket div {
+
+ul.ticketlist li.ticket div.metadata div {
     padding: 0.2em;
 }
 
 
-ul.ticketlist li.ticket br {
-    display: none;
+ul.ticketlist li.ticket div.metadata div {
+    display: block;
 }
 
-ul.ticketlist li.ticket div.metadata div {
+ul.ticketlist li.ticket div.metadata .label {
     display: inline-block;
+    width: 6em;
+    font-size: 1em;
+    text-align: right;
+    color: #666;
 }
 
 div#paging {
@@ -157,14 +170,31 @@ div#paging {
     display: none;
 }
 
+a {
+    color: #000;
+}
+
 .ticket_menu a, .menu a {
     text-decoration: none;
-    color: #000;
+}
+
+ul.menu a {
+    padding: 0.5em;
+    margin-top: -0.5em;
+    margin-bottom: -0.5em;
+    display: inline-block;
+    width: 100%;
 }
 
 ul.menu a:after {
     color: #666;
-    content: " >";
+    float: right;
+    content: ">";
+    font-size: 1.5em;
+    padding: 0;
+    margin: 0;
+    padding-right: 1em;
+
 }
 
 ul.menu form {
@@ -216,6 +246,10 @@ ul.menu form input{
     border-right: 0; 
 }
 
+.ticket-info-reminders table {
+
+    width: 100%;
+}
 
 .history ul.history-list {
     padding: 0;
@@ -306,17 +340,17 @@ div.txn-content {
 }
 
 .label {
-    text-align: left;
-    font-size: 0.8em;
-    clear:both;
-    display: block;
+    text-align: right;
+    width: 10em;
+    color: #666;
+    display: inline-block;
     padding-bottom: 0.2em;
     
 }
 
-div.entry {
+div.entry, tr.input-row {
     margin-bottom: 1em;
-    padding-bottom: 1em;
+    padding-bottom: 0.25em;
     border-bottom: 1px solid #ccc;
     display: block;
     width: 100%;
diff --git a/html/m/_elements/ticket_list b/html/m/_elements/ticket_list
index b69829d..43a54c6 100644
--- a/html/m/_elements/ticket_list
+++ b/html/m/_elements/ticket_list
@@ -41,10 +41,13 @@ loc("Found [quant,_1,ticket]",$collection->Count) &>
 <%perl>
 
 </%perl>
-<div class="requestors"><span class="label"><&|/l&>Requestors</&>:</span> <& /Ticket/Elements/ShowGroupMembers, Group => $ticket->Requestors, Ticket => $ticket &> <%$ticket->CreatedObj->AgeAsString()%></div>
+<div class="requestors"><span class="label"><&|/l&>Requestors</&>:</span> <& /Ticket/Elements/ShowGroupMembers, Group => $ticket->Requestors, Ticket => $ticket &></div>
 <div class="status"><span class="label"><&|/l&>Status</&>:</span> <%$ticket->Status%></div>
 <div class="owner"><span class="label"><&|/l&>Owner</&>:</span> <& /Elements/ShowUser, User => $ticket->OwnerObj, Ticket => $ticket &></div>
+<div class="created"><span class="label"><&|/l&>Created</&>:</span> <%$ticket->CreatedObj->AgeAsString()%></div>
+% if ($ticket->Priority) {
 <div class="priority"><span class="label"><&|/l&>Priority</&>:</span> <%$ticket->Priority%></div>
+% }
 </div>
 </li>
 % }
diff --git a/html/m/ticket/show b/html/m/ticket/show
index f047e65..c650019 100644
--- a/html/m/ticket/show
+++ b/html/m/ticket/show
@@ -224,7 +224,6 @@ my $print_value = sub {
   </div>
 % }
 
-% $m->callback( CallbackName => 'AfterCustomFields', Object => $Ticket );
 </&>
 % }
 
@@ -300,7 +299,8 @@ if ($size) {
 </&>
 
 % }
-% if ( RT->Config->Get('EnableReminders') ) {
+% # too painful to deal with reminders
+% if ( 0 &&  RT->Config->Get('EnableReminders') ) {
     <&|/Widgets/TitleBox, title => loc("Reminders"),
         class => 'ticket-info-reminders',
     &>
@@ -331,7 +331,7 @@ if ($size) {
     <div class="value date started"><% $Ticket->StartedObj->AsString %></div>
   </div>
  <div class="entry">
-    <div class="label date told"><a href="<% RT->Config->Get('WebPath') %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</div>
+    <div class="label date told"><&|/l&>Last Contact</&>:</div>
     <div class="value date told"><% $Ticket->ToldObj->AsString %></div>
   </div>
  <div class="entry">
@@ -352,14 +352,13 @@ if ($size) {
 % my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name) : loc("Never");
     <div class="value date updated"><% $UpdatedString | h %></div>
   </div>
-% $m->callback( %ARGS, CallbackName => 'EndOfList', TicketObj => $Ticket );
 
     </&>
 
     <&| /Widgets/TitleBox, title => loc('Links'), class => 'ticket-info-links' &>
 
  <div class="entry">
-    <div class="label"><% loc('Depends on')%></div>
+    <div class="label"><% loc('Depends on')%>:</div>
     <div class="value">
 
 <%PERL>
@@ -389,7 +388,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     </div>
   </div>
  <div class="entry">
-    <div class="label"><% loc('Depended on by')%></div>
+    <div class="label"><% loc('Depended on by')%>:</div>
     <div class="value">
 <ul>
 % while (my $Link = $Ticket->DependedOnBy->Next) {
@@ -399,15 +398,15 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     </div>
   </div>
  <div class="entry">
-    <div class="label"><% loc('Parents') %></div>
+    <div class="label"><% loc('Parents') %>:</div>
     <div class="value"><& /Ticket/Elements/ShowParents, Ticket => $Ticket &></div>
   </div>
  <div class="entry">
-    <div class="label"><% loc('Children')%></div>
+    <div class="label"><% loc('Children')%>:</div>
     <div class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></div>
   </div>
  <div class="entry">
-    <div class="label"><% loc('Refers to')%></div>
+    <div class="label"><% loc('Refers to')%>:</div>
     <div class="value">
 <ul>
 % while (my $Link = $Ticket->RefersTo->Next) {
@@ -417,7 +416,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     </div>
   </div>
  <div class="entry">
-    <div class="label"><% loc('Referred to by')%></div>
+    <div class="label"><% loc('Referred to by')%>:</div>
     <div class="value">
     <ul>
 % while (my $Link = $Ticket->ReferredToBy->Next) {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list