Patchwork [bitbake-devel,03/19] toaster: Move <tbody> outside for statement

login
register
mail settings
Submitter Alexandru DAMIAN
Date March 14, 2014, 5:58 p.m.
Message ID <0c111b24e9f86130bc43c1327a6d12026e92cdf2.1394819783.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/68637/
State New
Headers show

Comments

Alexandru DAMIAN - March 14, 2014, 5:58 p.m.
From: Belen Barros Pena <belen.barros.pena@intel.com>

In the package details pages, the <tbody> tags where inside
the for statements, which caused multiple <tbody> tags to
be generated inside a single table.

To make sure only one <tbody> tag exists per table, moving
the <tbody> tag outside the for statement.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
---
 .../templates/package_built_dependencies.html      | 70 +++++++++++-----------
 .../toastergui/templates/package_built_detail.html | 10 ++--
 .../templates/package_included_dependencies.html   | 19 +++---
 .../templates/package_included_detail.html         |  8 +--
 .../package_included_reverse_dependencies.html     |  8 +--
 5 files changed, 56 insertions(+), 59 deletions(-)

Patch

diff --git a/lib/toaster/toastergui/templates/package_built_dependencies.html b/lib/toaster/toastergui/templates/package_built_dependencies.html
index c67f60e..4932f74 100644
--- a/lib/toaster/toastergui/templates/package_built_dependencies.html
+++ b/lib/toaster/toastergui/templates/package_built_dependencies.html
@@ -35,8 +35,8 @@ 
                             <th>Size</th>
                         </tr>
                     </thead>
-                    {% for runtime_dep in runtime_deps %}
-                        <tbody>
+                    <tbody>
+						{% for runtime_dep in runtime_deps %}
                             {% ifequal runtime_dep.version '' %}
                                 <tr class="muted">
                                     <td>{{runtime_dep.name}}</td>
@@ -55,8 +55,8 @@ 
                                     <td>{{runtime_dep.size|filtered_filesizeformat}}</td>
                                 </tr>
                             {% endifequal %}
-                        </tbody>
-                    {% endfor %}
+						{% endfor %}
+                    </tbody>    
                 </table>
             {% endifequal %}
             {% ifnotequal other_deps|length 0 %}
@@ -67,43 +67,41 @@ 
                             <th>Package</th>
                             <th>Version</th>
                             <th>Size</th>
-
                             <th>
                                 <i class="icon-question-sign get-help" title="There are 5 relationship types: recommends, suggests, provides, replaces and conflicts"></i>
                                 Relationship type
                             </th>
                         </tr>
-                    </thead>
-
-                    {% for other_dep in other_deps %}
-                        <tbody>
-                        {% ifequal other_dep.version '' %}
-                            <tr class="muted">
-                                <td>{{other_dep.name}}</td>
-                                <td>{{other_dep.version}}</td>
-                                <td></td>
-                                <td>
-                                    {{other_dep.dep_type_display}}
-                                    <i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
-                                </td>
-                            </tr>
-                        {% else %}
-                            <tr>
-                                <td>
-                                    <a href="{% url 'package_built_detail' build.id other_dep.depends_on_id %}">
-                                        {{other_dep.name}}
-                                    </a>
-                                </td>
-                                <td>{{other_dep.version}}</td>
-                                <td>{{other_dep.size|filtered_filesizeformat}}</td>
-                                <td>
-                                    {{other_dep.dep_type_display}}
-                                    <i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
-                                </td>
-                            </tr>
-                        </tbody>
-                        {% endifequal %}
-                    {% endfor %}
+                    </thead>       
+                    <tbody>
+						{% for other_dep in other_deps %}
+                        	{% ifequal other_dep.version '' %}
+                            	<tr class="muted">
+                                	<td>{{other_dep.name}}</td>
+                                	<td>{{other_dep.version}}</td>
+                                	<td></td>
+                                	<td>
+                                    	{{other_dep.dep_type_display}}
+                                    	<i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
+                                	</td>
+                            	</tr>
+                        	{% else %}
+                            	<tr>
+                                	<td>
+                                    	<a href="{% url 'package_built_detail' build.id other_dep.depends_on_id %}">
+                                        	{{other_dep.name}}
+                                    	</a>
+                                	</td>
+                                	<td>{{other_dep.version}}</td>
+                                	<td>{{other_dep.size|filtered_filesizeformat}}</td>
+                                	<td>
+                                    	{{other_dep.dep_type_display}}
+                                    	<i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
+                                	</td>
+                            	</tr>
+                        	{% endifequal %}
+                    	{% endfor %}
+                    </tbody>
                 </table>
                 {% endifnotequal %}
             </div> <!-- tab-pane -->
diff --git a/lib/toaster/toastergui/templates/package_built_detail.html b/lib/toaster/toastergui/templates/package_built_detail.html
index fe856a3..b50ef53 100644
--- a/lib/toaster/toastergui/templates/package_built_detail.html
+++ b/lib/toaster/toastergui/templates/package_built_detail.html
@@ -29,15 +29,15 @@ 
                             <th>File</th>
                             <th>Size</th>
                         </tr>
-                    </thead>
-                    {% for file in package.buildfilelist_package.all|dictsort:"path" %}
-                        <tbody>
+                    </thead>                   
+                    <tbody>
+						{% for file in package.buildfilelist_package.all|dictsort:"path" %}
                             <tr>
                                 <td>{{file.path}}</td>
                                 <td>{{file.size|filtered_filesizeformat}}</td>
                             </tr>
-                        </tbody>
-                    {% endfor %}
+						{% endfor %}
+                    </tbody>
                 </table>
 
             {% else %}
diff --git a/lib/toaster/toastergui/templates/package_included_dependencies.html b/lib/toaster/toastergui/templates/package_included_dependencies.html
index c8c2ddd..00d42e7 100644
--- a/lib/toaster/toastergui/templates/package_included_dependencies.html
+++ b/lib/toaster/toastergui/templates/package_included_dependencies.html
@@ -21,8 +21,8 @@ 
                         <th>Size</th>
                     </tr>
                 </thead>
-                {% for runtime_dep in runtime_deps %}
-                    <tbody>
+                <tbody>
+					{% for runtime_dep in runtime_deps %}
                         <tr>
                             <td>
                                <a href="{% url 'package_included_detail' build.id target.id runtime_dep.depends_on_id %}">
@@ -32,8 +32,8 @@ 
                             <td>{{runtime_dep.version}}</td>
                             <td>{{runtime_dep.size|filtered_filesizeformat}}</td>
                         </tr>
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                 </tbody>                
             </table>
         {% else %}
             <div class="alert alert-info">
@@ -54,10 +54,9 @@ 
                             Relationship type
                         </th>
                     </tr>
-                </thead>
-
-                {% for other_dep in other_deps %}
-                    <tbody>
+                </thead>               
+                <tbody>
+					{% for other_dep in other_deps %}
                         {% if other_dep.installed %}
                             <tr>
                                 <td>
@@ -83,8 +82,8 @@ 
                                 </td>
                             </tr>
                         {% endif %}
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                </tbody>               
             </table>
         {% endifnotequal %}
         </div> <!-- end tab-pane -->
diff --git a/lib/toaster/toastergui/templates/package_included_detail.html b/lib/toaster/toastergui/templates/package_included_detail.html
index 018de3e..af56b21 100644
--- a/lib/toaster/toastergui/templates/package_included_detail.html
+++ b/lib/toaster/toastergui/templates/package_included_detail.html
@@ -20,8 +20,8 @@ 
                         <th>Size</th>
                     </tr>
                 </thead>
-                {% for file in package.buildfilelist_package.all|dictsort:"path" %}
-                    <tbody>
+                <tbody>
+					{% for file in package.buildfilelist_package.all|dictsort:"path" %}
                         <tr>
                             <td>
                                 <a href="{% url 'image_information_dir' build.id target.id file.id %}">
@@ -30,8 +30,8 @@ 
                              </td>
                             <td>{{file.size|filtered_filesizeformat}}</td>
                         </tr>
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                </tbody>
             </table>
 
             {% else %}
diff --git a/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html b/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
index 9cfc7fe..8ae0af3 100644
--- a/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
+++ b/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
@@ -26,8 +26,8 @@ 
                         <th>Size</th>
                     </tr>
                 </thead>
-                {% for reverse_dep in reverse_deps|dictsort:"name" %}
-                    <tbody>
+                <tbody>
+					{% for reverse_dep in reverse_deps|dictsort:"name" %}
                         <tr>
                             <td>
                                 <a href="{% url 'package_included_detail' build.id target.id reverse_dep.dependent_id %}">
@@ -37,8 +37,8 @@ 
                             <td>{{reverse_dep.version}}</td>
                             <td>{{reverse_dep.size|filtered_filesizeformat}}</td>
                         </tr>
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                </tbody>
             </table>
         {% endifequal %}
         </div> <!-- end tab-pane -->