incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1307993 - /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_grid.html
Date Sun, 01 Apr 2012 01:44:42 GMT
Author: gjm
Date: Sun Apr  1 01:44:42 2012
New Revision: 1307993

URL: http://svn.apache.org/viewvc?rev=1307993&view=rev
Log:
Dashboard code import: BH_Dashboard: Alert box displayed in grid (widget) if no items found

Modified:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_grid.html

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_grid.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_grid.html?rev=1307993&r1=1307992&r2=1307993&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_grid.html
(original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_grid.html
Sun Apr  1 01:44:42 2012
@@ -17,114 +17,119 @@
     <div py:when="numrows" class="numrows">($numrows total rows)</div>
   </py:choose>
 
-  <table class="table table-condensed tickets" 
-      py:with="use_groups = len(row_groups) &gt; 1 or row_groups[0][0] is not None">
-    <thead>
-      <tr py:for="header_group in header_groups">
-        <th py:if="use_groups"></th>
-        <th py:for="header in header_group" py:if="not header.hidden" py:with="fullrow
= header is header_group[-1]"
-            colspan="${fullrow and '100' or None}">
-          ${header.title}
-        </th>
-      </tr>
-    </thead>
-    <tbody>
-      <py:for each="(value_for_group, row_group) in row_groups">
-        <py:for each="idx, row in enumerate(row_group)">
-          <tr py:for="cell_group in row.cell_groups"
-            py:with="fullrow = len(cell_group) == 1;
-                     td_attrs = fullrow and {'class': 'fullrow', 'colspan': 100} or {}"
-            class="${'__color__' in row and 'color'+row.__color__+'-' or ''}${row.__idx__
% 2 and 'odd' or 'even'}"
-            style="${'__bgcolor__' in row and 'background: '+row.__bgcolor__+';' or None
-            }${'__fgcolor__' in row and 'color: '+row.__fgcolor__+';' or None
-            }${'__style__' in row and row.__style__+';' or None
-            }${fullrow and 'border: none; padding: 0;' or None}">
-
-            <td py:if="use_groups" style="background: none repeat scroll 0 0 #FFFFFF;
color: #333333;">
-              <py:if test="idx == 0">$value_for_group</py:if>
-            </td>
-            <py:for each="cell in cell_group">
-              <py:if test="not cell.header.hidden">
-                <py:with vars="col = cell.header.col.strip('_')">
-                  <py:choose>
-
-                    <!--! for the report listing -->
-                    <py:when test="col == 'report'">
-                      <td class="$col" py:attrs="td_attrs">
-                        <a title="View report" href="${href.report(cell.value)}">{$cell.value}</a>
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <py:when test="col == 'title'">
-                      <td class="$col" py:attrs="td_attrs">
-                        <a title="View report" href="${href.report(row.id)}">$cell.value</a>
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <!--! for the ticket listing -->
-                    <py:when test="col in ('ticket', 'id')">
-                      <td class="ticket" py:attrs="td_attrs">
-                        <a title="View ${row.resource.realm}" href="${url_of(row.resource)}">#$cell.value</a>
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <py:when test="col == 'summary' and row.id">
-                      <td class="$col" py:attrs="td_attrs">
-                        <a title="View ${row.resource.realm}" href="${url_of(row.resource)}">$cell.value</a>
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <!--! generic fields -->
-                    <py:when test="col == 'time'">
-                      <td class="date" py:attrs="td_attrs">${cell.value != '' and format_time(int(cell.value))
or '--'}
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <py:when test="col in ('date', 'created', 'modified')">
-                      <td class="date" py:attrs="td_attrs">${cell.value != '' and format_date(int(cell.value))
or '--'}
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <py:when test="col == 'datetime'">
-                      <td class="date" py:attrs="td_attrs">${cell.value != '' and format_datetime(int(cell.value))
or '--'}
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <py:when test="col == 'description'">
-                      <td class="$col" py:attrs="td_attrs" xml:space="preserve">
-                        ${wiki_to_html(context(row.resource), cell.value)}
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <py:when test="col == 'milestone'">
-                      <td class="$col" py:attrs="td_attrs">
-                        <a title="View milestone" href="${href.milestone(cell.value)}">$cell.value</a>
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:when>
-
-                    <py:otherwise>
-                      <td class="$col" py:attrs="td_attrs">$cell.value
-                        <hr py:if="fullrow"/>
-                      </td>
-                    </py:otherwise>
-
-                  </py:choose>
-                </py:with>
-              </py:if>
-            </py:for>
-          </tr>
+  <py:choose test="">
+    <table class="table table-condensed tickets" py:when="numrows"
+        py:with="use_groups = len(row_groups) &gt; 1 or row_groups[0][0] is not None">
+      <thead>
+        <tr py:for="header_group in header_groups">
+          <th py:if="use_groups"></th>
+          <th py:for="header in header_group" py:if="not header.hidden" py:with="fullrow
= header is header_group[-1]"
+              colspan="${fullrow and '100' or None}">
+            ${header.title}
+          </th>
+        </tr>
+      </thead>
+      <tbody>
+        <py:for each="(value_for_group, row_group) in row_groups">
+          <py:for each="idx, row in enumerate(row_group)">
+            <tr py:for="cell_group in row.cell_groups"
+              py:with="fullrow = len(cell_group) == 1;
+                       td_attrs = fullrow and {'class': 'fullrow', 'colspan': 100} or {}"
+              class="${'__color__' in row and 'color'+row.__color__+'-' or ''}${row.__idx__
% 2 and 'odd' or 'even'}"
+              style="${'__bgcolor__' in row and 'background: '+row.__bgcolor__+';' or None
+              }${'__fgcolor__' in row and 'color: '+row.__fgcolor__+';' or None
+              }${'__style__' in row and row.__style__+';' or None
+              }${fullrow and 'border: none; padding: 0;' or None}">
+  
+              <td py:if="use_groups" style="background: none repeat scroll 0 0 #FFFFFF;
color: #333333;">
+                <py:if test="idx == 0">$value_for_group</py:if>
+              </td>
+              <py:for each="cell in cell_group">
+                <py:if test="not cell.header.hidden">
+                  <py:with vars="col = cell.header.col.strip('_')">
+                    <py:choose>
+  
+                      <!--! for the report listing -->
+                      <py:when test="col == 'report'">
+                        <td class="$col" py:attrs="td_attrs">
+                          <a title="View report" href="${href.report(cell.value)}">{$cell.value}</a>
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <py:when test="col == 'title'">
+                        <td class="$col" py:attrs="td_attrs">
+                          <a title="View report" href="${href.report(row.id)}">$cell.value</a>
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <!--! for the ticket listing -->
+                      <py:when test="col in ('ticket', 'id')">
+                        <td class="ticket" py:attrs="td_attrs">
+                          <a title="View ${row.resource.realm}" href="${url_of(row.resource)}">#$cell.value</a>
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <py:when test="col == 'summary' and row.id">
+                        <td class="$col" py:attrs="td_attrs">
+                          <a title="View ${row.resource.realm}" href="${url_of(row.resource)}">$cell.value</a>
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <!--! generic fields -->
+                      <py:when test="col == 'time'">
+                        <td class="date" py:attrs="td_attrs">${cell.value != '' and
format_time(int(cell.value)) or '--'}
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <py:when test="col in ('date', 'created', 'modified')">
+                        <td class="date" py:attrs="td_attrs">${cell.value != '' and
format_date(int(cell.value)) or '--'}
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <py:when test="col == 'datetime'">
+                        <td class="date" py:attrs="td_attrs">${cell.value != '' and
format_datetime(int(cell.value)) or '--'}
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <py:when test="col == 'description'">
+                        <td class="$col" py:attrs="td_attrs" xml:space="preserve">
+                          ${wiki_to_html(context(row.resource), cell.value)}
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <py:when test="col == 'milestone'">
+                        <td class="$col" py:attrs="td_attrs">
+                          <a title="View milestone" href="${href.milestone(cell.value)}">$cell.value</a>
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:when>
+  
+                      <py:otherwise>
+                        <td class="$col" py:attrs="td_attrs">$cell.value
+                          <hr py:if="fullrow"/>
+                        </td>
+                      </py:otherwise>
+  
+                    </py:choose>
+                  </py:with>
+                </py:if>
+              </py:for>
+            </tr>
+          </py:for>
         </py:for>
-      </py:for>
-    </tbody>
-  </table>
+      </tbody>
+    </table>
+    <div class="alert alert-info" py:otherwise="" style="margin-top: 2em;">
+      <span class="label label-info">Info</span> Items list is empty
+    </div>
+  </py:choose>
 </div>
 



Mime
View raw message