diff options
author | Mark Wells <mark@freeside.biz> | 2016-05-25 16:29:05 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-05-25 17:12:53 -0700 |
commit | dd620f18b9a9dd01d4a21de9fb4f1194ba6d003d (patch) | |
tree | 5014be1a9a519b37c2154dae6ede81afbaeb09f6 /httemplate/elements | |
parent | 55cbf09dd0b74cafdf9ec595a62201bd25f71d54 (diff) |
indicator on the top bar for new activity on tickets, #41670
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/header-full.html | 3 | ||||
-rw-r--r-- | httemplate/elements/notify-tickets.html | 37 |
2 files changed, 40 insertions, 0 deletions
diff --git a/httemplate/elements/header-full.html b/httemplate/elements/header-full.html index a67538d11..611da10dc 100644 --- a/httemplate/elements/header-full.html +++ b/httemplate/elements/header-full.html @@ -75,6 +75,9 @@ Example: <td align=left BGCOLOR="#ffffff"> <!-- valign="top" --> <font size=6><% $company_name || 'ExampleCo' %></font> </td> + <td align="right" BGCOLOR="#ffffff"> + <& notify-tickets.html &> + </td> <td align=right valign=top BGCOLOR="#ffffff"><FONT SIZE="-1">Logged in as <b><% getotaker %> </b> <FONT SIZE="-2"><a href="javascript:void(0);" onClick="logout();">logout</a></FONT><br></FONT><FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html" STYLE="color: #000000">Preferences</a> % if ( $conf->config("ticket_system") % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) { diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html new file mode 100644 index 000000000..f7db52e7b --- /dev/null +++ b/httemplate/elements/notify-tickets.html @@ -0,0 +1,37 @@ +% if ($enabled) { +<style> +.dot { + border-radius: 50%; + border: 1px solid black; + width: 1ex; + height: 1ex; + display: inline-block; +} +</style> +<div style="font-weight: bold; vertical-align: bottom; text-align: left"> +% if ( $UnrepliedTickets->Count > 0 ) { + <a href="<% $fsurl %>rt/Search/UnrepliedTickets.html"> + <div class="dot" style="background-color: green"></div> + <% emt('New activity on [quant,_1,ticket]', $UnrepliedTickets->Count) %> + </a> +% } else { + <% emt('No new activity on tickets') %> +% } +</div> +% } +<%init> +use Class::Load 'load_class'; + +my $enabled = $FS::TicketSystem::system eq 'RT_Internal'; +my $UnrepliedTickets; +if ($enabled) { + my $class = 'RT::Search::UnrepliedTickets'; + load_class($class); + my $session = FS::TicketSystem->session; + my $CurrentUser = $session->{CurrentUser}; + $UnrepliedTickets = RT::Tickets->new($CurrentUser); + my $search = $class->new(TicketsObj => $UnrepliedTickets); +warn Dumper $search; + $search->Prepare; +} +</%init> |