]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toastergui: hide table controls when when less than 10 entries
authorBelen Barros Pena <belen.barros.pena@intel.com>
Mon, 26 Jan 2015 16:02:24 +0000 (16:02 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Tue, 27 Jan 2015 14:25:07 +0000 (14:25 +0000)
The 'show rows' and pagination controls in the layer details
page should only show when there are more than 10 entries
in a table.

[YOCTO #7217]

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
lib/toaster/toastergui/templates/layerdetails.html

index 6c5e7859aae444dc279b2b312ce2a2ede0aafc12..1daf9b950010ebf7b870e0ab0419e936c9135621 100644 (file)
                      </div>
                     {% else %}
 
+                    {% if total_targets > 10 %}
                     <div class="pull-right">
                       <span class="help-inline" style="padding-top:5px;">Show rows:</span>
                       <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
                       {% endwith %}
                     </select>
                   </div>
+                  {% endif %}
                 </div>
 
                 <table class="table table-bordered table-hover">
                     </tbody>
                   </table>
 
+                  {% if total_targets > 10 %}
                   <!-- Show pagination controls -->
                   <div class="pagination">
                     <ul>
                   </div>
                   {% endif %}
                   {% endif %}
+                  {% endif %}
                 </div>
 
 
                      </div>
                      <!-- end row-fluid -->
                      </div>
+
                     {% else %}
 
+                    {% if total_machines > 10 %}
                     <div class="pull-right">
                       <span class="help-inline" style="padding-top:5px;">Show rows:</span>
                       <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
                       {% endwith %}
                     </select>
                   </div>
+                  {% endif %}
+
                 </div>
 
                 <table class="table table-bordered table-hover">
                     </tbody>
                   </table>
 
+                  {% if total_machines > 10 %}
                   <!-- Show pagination controls -->
                   <div class="pagination">
                     <ul>
                   </div>
                   {% endif %}
                   {% endif %}
+                  {% endif %}
                   </div>
               </div>
             </div>