You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/07/04 08:41:31 UTC

svn commit: r1499662 - /bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_timeline.html

Author: rjollos
Date: Thu Jul  4 06:41:30 2013
New Revision: 1499662

URL: http://svn.apache.org/r1499662
Log:
Added a bootstrap template for the `/timeline` page. Fixes #461.

Modified:
    bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_timeline.html

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_timeline.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_timeline.html?rev=1499662&r1=1499661&r2=1499662&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_timeline.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_timeline.html Thu Jul  4 06:41:30 2013
@@ -35,54 +35,41 @@
   </head>
 
   <body>
-    <div id="content" class="timeline">
+    <div id="content" class="timeline row">
 
-      <h1>Timeline</h1>
+      <h1 class="span12">Timeline</h1>
 
-      <form id="prefs" method="get" action="">
-       <div i18n:msg="">
-        <label>View changes from <input type="text" id="fromdate" size="10" name="from" value="${format_date(fromdate)}" /></label> <br />
-        and <label><input type="text" size="3" name="daysback" value="$daysback" /> days back</label><br />
-        <label>done by <input type="text" size="16" name="authors" value="$authors" /></label>
-       </div>
-       <fieldset>
-        <label py:for="filter in filters">
-          <input type="checkbox" name="${filter.name}"
-                 checked="${filter.enabled or None}"/> ${filter.label}
-        </label>
-       </fieldset>
-       <div class="buttons">
-         <input type="submit" name="update" value="${_('Update')}" />
-       </div>
-      </form>
-
-      <py:for each="day, events in groupby(events, key=lambda e: format_date(e.date))">
-        <h2>${day}: ${_("Today") if day == today else _("Yesterday") if day == yesterday else None}</h2>
-        <dl py:for="unread, events in groupby(events, key=lambda e: lastvisit and lastvisit &lt; e.dateuid)"
-            class="${'unread' if unread else None}">
-          <py:for each="event in events"
-            py:with="highlight = precision and precisedate and timedelta(0) &lt;= (event.date - precisedate) &lt; precision">
-            <dt class="${classes(event.kind, highlight=highlight, unread=unread)}">
-              <a href="${event.render('url', context)}" py:choose="">
-                <py:when test="event.author"><i18n:msg params="time, title, author">
-                  <span class="time">${format_time(event.date, 'short')}</span> ${event.render('title', context)}
-                  by <span class="author">${format_author(event.author)}</span>
-                </i18n:msg></py:when>
-                <py:otherwise>
-                  <span class="time">${format_time(event.date, 'short')}</span> ${event.render('title', context)}
-                </py:otherwise>
-              </a>
-            </dt>
-            <dd class="${classes(event.kind, highlight=highlight)}">
-              ${event.render('description', context)}
-            </dd>
-          </py:for>
-        </dl>
-      </py:for>
-
-      <div id="help" i18n:msg="">
-        <strong>Note:</strong> See <a href="${href.wiki('TracTimeline')}">TracTimeline</a>
-        for information about the timeline view.
+      <div class="span12">
+        <div class="well">
+          <form id="prefs" method="get" action="" class="form-inline">
+            <div i18n:msg="">
+              <label>View changes from <input type="text" id="fromdate" size="10" name="from" value="${format_date(fromdate)}" /></label>
+              and <label><input type="text" class="input-mini" name="daysback" value="$daysback" /> days back</label>
+              <label>done by <input type="text" size="16" name="authors" value="$authors" /></label>
+            </div>
+            <fieldset>
+              <label py:for="filter in filters">
+                <input type="checkbox" name="${filter.name}"
+                       checked="${filter.enabled or None}"/> ${filter.label}
+              </label>
+            </fieldset><br />
+            <div class="buttons">
+              <input type="submit" class="btn" name="update" value="${_('Update')}" />
+            </div>
+          </form>
+        </div>
+      </div>
+
+      <div class="span12">
+        <xi:include href="widget_timeline.html" />
+      </div>
+
+      <div id="help" class="span12" i18n:msg="">
+        <p class="help-block pull-right">
+          <span class="label label-info">Note:</span> See
+          <a href="${href.wiki('TracTimeline')}">TracTimeline</a>
+          for information about the timeline view.
+        </p>
       </div>
 
     </div>