A row in the base template caused duplicated row divs and issues with the most complex layouts we use in the details pages. Remove the row from the base template and set the rows in each template as needed instead.
Signed-off-by: Belen Barros Pena <[email protected]> --- bitbake/lib/toaster/toastergui/templates/base.html | 6 +- .../toastergui/templates/baseprojectpage.html | 64 +++++++++++----------- .../toastergui/templates/builds-toastertable.html | 2 + .../toaster/toastergui/templates/importlayer.html | 2 + .../toastergui/templates/newcustomimage.html | 15 +++-- .../templates/projectbuilds-toastertable.html | 2 + .../templates/projects-toastertable.html | 58 ++++++++++---------- 7 files changed, 81 insertions(+), 68 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 62f3699..0c305a2 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html @@ -120,10 +120,8 @@ </div> <div class="container-fluid top-padded"> - <div class="row"> - {% block pagecontent %} - {% endblock %} - </div> + {% block pagecontent %} + {% endblock %} </div> </body> </html> diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html index 0d12a36..483a485 100644 --- a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html +++ b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html @@ -7,37 +7,39 @@ {% block pagecontent %} -{% include "projecttopbar.html" %} -<script type="text/javascript"> - $(document).ready(function(){ - $("#config-nav .nav li a").each(function(){ - if (window.location.pathname === $(this).attr('href')) - $(this).parent().addClass('active'); - else - $(this).parent().removeClass('active'); - }); - - $("#topbar-configuration-tab").addClass("active") - }); -</script> - -<!-- only on config pages --> -<div id="config-nav" class="col-md-2"> - <ul class="nav nav-list well"> - <li><a class="nav-parent" href="{% url 'project' project.id %}">Configuration</a></li> - <li class="nav-header">Compatible metadata</li> - <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a></li> - <li><a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a></li> - <li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li> - <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li> - <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li> - <li class="nav-header">Extra configuration</li> - <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li> - </ul> -</div> -<div class="col-md-10"> - {% block projectinfomain %}{% endblock %} -</div> +<div class="row"> + {% include "projecttopbar.html" %} + <script type="text/javascript"> +$(document).ready(function(){ + $("#config-nav .nav li a").each(function(){ + if (window.location.pathname === $(this).attr('href')) + $(this).parent().addClass('active'); + else + $(this).parent().removeClass('active'); + }); + + $("#topbar-configuration-tab").addClass("active") + }); + </script> + + <!-- only on config pages --> + <div id="config-nav" class="col-md-2"> + <ul class="nav nav-list well"> + <li><a class="nav-parent" href="{% url 'project' project.id %}">Configuration</a></li> + <li class="nav-header">Compatible metadata</li> + <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a></li> + <li><a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a></li> + <li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li> + <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li> + <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li> + <li class="nav-header">Extra configuration</li> + <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li> + </ul> + </div> + <div class="col-md-10"> + {% block projectinfomain %}{% endblock %} + </div> +</div> {% endblock %} diff --git a/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html b/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html index 9b4f3fe..0afe0a3 100644 --- a/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html +++ b/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html @@ -13,6 +13,7 @@ {% block pagecontent %} +<div class="row"> <div class="col-md-12"> {% with mru=mru mrb_type=mrb_type %} {% include 'mrb_section.html' %} @@ -25,6 +26,7 @@ {% url 'builds' as xhr_table_url %} {% include 'toastertable.html' %} </div> +</div> <script> $(document).ready(function () { diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html index 321527c..765106c 100644 --- a/bitbake/lib/toaster/toastergui/templates/importlayer.html +++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html @@ -5,6 +5,7 @@ {% block title %} Import layer - {{project.name}} - Toaster {% endblock %} {% block pagecontent %} +<div class="row"> {% include "projecttopbar.html" %} @@ -136,4 +137,5 @@ </div> {% endif %} +</div> {% endblock %} diff --git a/bitbake/lib/toaster/toastergui/templates/newcustomimage.html b/bitbake/lib/toaster/toastergui/templates/newcustomimage.html index f8a00d3..980179a 100644 --- a/bitbake/lib/toaster/toastergui/templates/newcustomimage.html +++ b/bitbake/lib/toaster/toastergui/templates/newcustomimage.html @@ -5,12 +5,17 @@ {% block pagecontent %} {% include "newcustomimage_modal.html" %} -{% include "projecttopbar.html" %} -<div class="col-md-12"> - {% url table_name project.id as xhr_table_url %} - <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>)</h2> - {% include "toastertable.html" %} +<div class="row"> + + {% include "projecttopbar.html" %} + + <div class="col-md-12"> + {% url table_name project.id as xhr_table_url %} + <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>)</h2> + {% include "toastertable.html" %} + </div> + </div> {% endblock %} diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html index 9ad2ac1..4118ebc 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html +++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html @@ -13,6 +13,7 @@ {% block title %} {{title}} - {{project.name}} - Toaster {% endblock %} {% block pagecontent %} +<div class="row"> {% include "projecttopbar.html" %} @@ -53,4 +54,5 @@ }); </script> +</div> {% endblock %} diff --git a/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html b/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html index cfbe3ae..d8020a9 100644 --- a/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html +++ b/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html @@ -4,37 +4,39 @@ {% block pagecontent %} -<div class="col-md-12"> - - <div class="page-header"> - <h1 data-role="page-title"></h1> - </div> - - {% url 'projects' as xhr_table_url %} - {% include 'toastertable.html' %} - - <script> - $(document).ready(function () { - var tableElt = $("#{{table_name}}"); - var titleElt = $("[data-role='page-title']"); - - tableElt.on("table-done", function (e, total, tableParams) { - var title = "All projects"; - - if (tableParams.search || tableParams.filter) { - if (total === 0) { - title = "No projects found"; - } - else if (total > 0) { - title = total + " project" + (total > 1 ? 's' : '') + " found"; - } - } - - titleElt.text(title); +<div class="row"> + <div class="col-md-12"> + + <div class="page-header"> + <h1 data-role="page-title"></h1> + </div> + + {% url 'projects' as xhr_table_url %} + {% include 'toastertable.html' %} + + <script> +$(document).ready(function () { + var tableElt = $("#{{table_name}}"); + var titleElt = $("[data-role='page-title']"); + + tableElt.on("table-done", function (e, total, tableParams) { + var title = "All projects"; + + if (tableParams.search || tableParams.filter) { + if (total === 0) { + title = "No projects found"; + } + else if (total > 0) { + title = total + " project" + (total > 1 ? 's' : '') + " found"; + } + } + + titleElt.text(title); }); }); - </script> + </script> + </div> </div> {% endblock %} -- 1.9.1 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
