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 2014/03/17 05:09:04 UTC

svn commit: r1578223 - in /bloodhound/trunk/bloodhound_theme/bhtheme: templates/bh_roadmap.html theme.py

Author: rjollos
Date: Mon Mar 17 04:09:03 2014
New Revision: 1578223

URL: http://svn.apache.org/r1578223
Log:
0.8dev: Added Bootstrap styling to Roadmap template. Refs #789.

Initial patch by thimal.

Modified:
    bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_roadmap.html
    bloodhound/trunk/bloodhound_theme/bhtheme/theme.py

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_roadmap.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_roadmap.html?rev=1578223&r1=1578222&r2=1578223&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_roadmap.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_roadmap.html Mon Mar 17 04:09:03 2014
@@ -24,81 +24,91 @@
       xmlns:py="http://genshi.edgewall.org/"
       xmlns:i18n="http://genshi.edgewall.org/i18n"
       xmlns:xi="http://www.w3.org/2001/XInclude">
-  <xi:include href="layout.html" />
+  <xi:include href="layout.html"/>
+  <xi:include href="widget_macros.html"/>
   <head>
     <title>Roadmap</title>
   </head>
 
   <body>
-    <div id="content" class="roadmap">
+    <div id="content" class="roadmap row">
 
-      <form id="prefs" method="get" action="">
-        <div>
-          <input type="checkbox" id="showcompleted" name="show" value="completed"
-                 checked="${'completed' in show or None}" />
-          <label for="showcompleted">Show completed milestones</label>
-        </div>
-        <div>
-          <input type="checkbox" id="hidenoduedate" name="show" value="noduedate"
-                 checked="${'noduedate' in show or None}" />
-          <label for="hidenoduedate">Hide milestones with no due date</label>
-        </div>
-        <div class="buttons">
-          <input type="submit" value="${_('Update')}" />
-        </div>
-      </form>
+      <h1 class="span12">Roadmap</h1>
 
-      <h1>Roadmap</h1>
+      <div class="span12">
+        <div class="well">
+          <form id="prefs" class="form-inline" role="form" method="get" action="">
+            <div>
+              <label class="checkbox">
+                <input type="checkbox" id="showcompleted" name="show" value="completed"
+                       checked="${'completed' in show or None}"/> Show completed
+                milestones
+              </label>
+              <label class="checkbox">
+                <input type="checkbox" id="hidenoduedate" name="show" value="noduedate"
+                       checked="${'noduedate' in show or None}"/> Hide milestones with no due date
+              </label>
+              <input class="btn btn-default pull-right" type="submit" value="${_('Update')}"/>
+            </div>
+          </form>
+        </div>
+      </div>
 
-      <div class="milestones">
+      <div class="milestones span12">
         <div py:for="idx, milestone in enumerate(milestones)" class="milestone">
 
           <div class="info trac-progress" py:with="mstats = milestone_stats[idx]">
             <h2><a href="${href.milestone(milestone.name)}">
-              Milestone: <em>${milestone.name}</em>
+              <span> Milestone:</span> <em>${milestone.name}</em>
             </a></h2>
             <py:choose>
               <p py:when="milestone.completed" class="date">
                 <i18n:msg params="duration, date">
-                  Completed ${dateinfo(milestone.completed)} ago (${format_datetime(milestone.completed)})
+                  Completed ${dateinfo(milestone.completed)} ago
+                  (${format_datetime(milestone.completed)})
                 </i18n:msg>
               </p>
               <p py:when="milestone.is_late" class="date">
                 <i18n:msg params="duration, date">
-                  <strong>${dateinfo(milestone.due)} late</strong> (${format_datetime(milestone.due)})
+                  <strong>${dateinfo(milestone.due)} late</strong>
+                  (${format_datetime(milestone.due)})
                 </i18n:msg>
               </p>
               <p py:when="milestone.due" class="date">
                 <i18n:msg params="duration, date">
-                  Due in ${dateinfo(milestone.due)} (${format_datetime(milestone.due)})
+                  Due in ${dateinfo(milestone.due)}
+                  (${format_datetime(milestone.due)})
                 </i18n:msg>
               </p>
               <p py:otherwise="" class="date">
-                No date set
+                <span class="label label-warning">No date set</span>
               </p>
             </py:choose>
-            <xi:include href="progress_bar.html" py:if="mstats.stats.count"
-                        py:with="stats = mstats.stats; interval_hrefs = mstats.interval_hrefs;
-                                 stats_href = mstats.stats_href"/>
+            <xi:include href="widget_progress.html" py:if="mstats.stats.count"
+                        py:with="view = 'standard'; legend = True;
+                                 stats = mstats.stats; interval_hrefs = mstats.interval_hrefs;
+                                 stats_href = mstats.stats_href;" />
           </div>
 
-          <div class="description" xml:space="preserve">
+          <div py:if="milestone.description" class="description well" xml:space="preserve">
             ${wiki_to_html(context.child(milestone.resource), milestone.description)}
           </div>
 
         </div>
       </div>
 
-      <div py:if="'MILESTONE_CREATE' in perm" class="buttons">
-       <form id="add" method="get" action="${href.milestone()}"><div>
-        <input type="hidden" name="action" value="new" />
-        <input type="submit" value="${_('Add new milestone')}" />
-       </div></form>
+      <div py:if="'MILESTONE_CREATE' in perm" class="buttons btn-toolbar span12">
+        <form id="add" method="get" action="${href.milestone()}"><div>
+          <input type="hidden" name="action" value="new" />
+          <input class="btn btn-default" type="submit" value="${_('Add new milestone')}" />
+        </div></form>
       </div>
 
-      <div id="help" i18n:msg=""><strong>Note:</strong> See
-        <a href="${href.wiki('TracRoadmap')}">TracRoadmap</a> for help on using
-        the roadmap.
+      <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('TracRoadmap')}">TracRoadmap</a> for help on using the roadmap.
+        </p>
       </div>
 
     </div>

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1578223&r1=1578222&r2=1578223&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Mon Mar 17 04:09:03 2014
@@ -117,7 +117,7 @@ class BloodhoundTheme(ThemeBase):
         'report_edit.html': ('bh_report_edit.html', '_add_products_general_breadcrumb'),
         'report_list.html': ('bh_report_list.html', '_add_products_general_breadcrumb'),
         'report_view.html': ('bh_report_view.html', '_add_products_general_breadcrumb'),
-        'roadmap.html': ('roadmap.html', '_modify_roadmap_page'),
+        'roadmap.html': ('bh_roadmap.html', '_modify_roadmap_page'),
         'ticket.html': ('bh_ticket.html', '_modify_ticket'),
         'ticket_delete.html': ('bh_ticket_delete.html', None),
         'ticket_preview.html': ('bh_ticket_preview.html', None),