public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alex Legler" <a3li@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/infra-status:master commit in: views/
Date: Thu, 17 Apr 2014 16:41:44 +0000 (UTC)	[thread overview]
Message-ID: <1397752891.15253a210025865dfae22996efe2ea1dff3c8269.a3li@gentoo> (raw)

commit:     15253a210025865dfae22996efe2ea1dff3c8269
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Thu Apr 17 16:41:31 2014 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Thu Apr 17 16:41:31 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=15253a21

Notice footer rework

---
 views/notice.erb | 37 +++++++++++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 6 deletions(-)

diff --git a/views/notice.erb b/views/notice.erb
index c27f802..5a91342 100644
--- a/views/notice.erb
+++ b/views/notice.erb
@@ -6,11 +6,36 @@
     <%= markdown notice.get_content %>
   </div>
   <div class="panel-footer">
-    <span class="pull-right">Posted at <em><%= date_format notice['created_at'] %></em></span>
-    <% if notice.has_key? 'eta' %>
-      <strong>Estimated time of service recovery: <em><%= date_format notice['eta'] %></em></strong>
-    <% else %>
-      <strong>No estimated time of service recovery available.</strong>
-    <% end %>
+    <div class="row">
+      <div class="col-sm-4 has-tooltip" data-toggle="tooltip" data-placement="top" title="Notice publication date">
+        <span class="glyphicon glyphicon-send pull-left" title="Notice publication date"></span>
+        <div style="margin-left: 1.25em"><em><%= date_format notice['created_at'] %></em></div>
+      </div>
+      <% if notice.has_key? 'starts_at' %>
+        <div class="col-sm-4 has-tooltip" data-toggle="tooltip" data-placement="top" title="Maintenance start time">
+        <% diff = ((DateTime.now - notice['starts_at']) * 24 * 60 * 60).to_i %>
+          <span class="glyphicon glyphicon-wrench pull-left" title="Maintenance start time"></span>
+          <div style="margin-left: 1.25em;"><em><%= date_format notice['starts_at'] %></em><br>
+            <% if diff < 0 %>
+              (in <em><%= humanize(-diff) %></em>)
+            <% else %>
+              (<em><%= humanize(diff) %></em> ago)
+            <% end %>
+          </div>
+        </div>
+      <% else %>
+        <div class="col-sm-4"></div>
+      <% end %>
+      <div class="col-sm-4 has-tooltip" data-toggle="tooltip" data-placement="top" title="Estimated time of service recovery">
+        <span class="glyphicon glyphicon-ok pull-left" title="Estimated time of service recovery"></span>
+        <div style="margin-left: 1.25em;">
+          <% if notice.has_key? 'eta' %>
+            <em><%= date_format notice['eta'] %></em> (estimated)
+          <% else %>
+            No estimated time of service recovery available.
+          <% end %>
+        </div>
+      </div>
+    </div>
   </div>
 </div>


             reply	other threads:[~2014-04-17 16:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 16:41 Alex Legler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-04-27 13:11 [gentoo-commits] proj/infra-status:master commit in: views/ Alex Legler
2014-04-17 16:49 Alex Legler
2014-04-17 16:45 Alex Legler
2014-01-18 12:29 Alex Legler
2014-01-18 12:10 Alex Legler
2014-01-16 16:43 ` Alex Legler
2014-01-16 16:43 Alex Legler
2014-01-18 12:10 ` Alex Legler
2013-11-12  9:21 Alex Legler
2013-11-11 17:22 Alex Legler
2013-11-11 17:04 Alex Legler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397752891.15253a210025865dfae22996efe2ea1dff3c8269.a3li@gentoo \
    --to=a3li@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox