Make sure the custom images page displays properly with Bootstrap 3.
Signed-off-by: Belen Barros Pena <[email protected]>
---
bitbake/lib/toaster/toastergui/static/css/default.css | 5 ++++-
bitbake/lib/toaster/toastergui/tables.py | 11 +++++++----
.../toastergui/templates/generic-toastertable-page.html | 2 +-
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css
b/bitbake/lib/toaster/toastergui/static/css/default.css
index 2e13fb0..e83a67b 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -76,7 +76,7 @@ tbody > tr > td > .glyphicon-minus-sign { color: #a94442; }
.glyphicon-edit { color: #337ab7; }
.failed_tasks .glyphicon-download-alt { margin-left: 5px; }
.glyphicon-download-alt:hover,
-.glyphicon-edit:hover { color: #23527c; cursor: pointer }
+.glyphicon-edit:hover { color: #23527c; cursor: pointer; text-decoration:
none; }
.glyphicon-trash { color: #a94442; }
.glyphicon-trash:hover { color: #843534; cursor: pointer; }
@@ -157,3 +157,6 @@ td > .tooltip-inner { padding: 10px; }
/* Set sane widths for table columns */
#newcustomimagestable .get_description_or_summary { width: 30%; }
+
+/* Override the rather ugly default code styles */
+code { color: #333; background-color: transparent; }
diff --git a/bitbake/lib/toaster/toastergui/tables.py
b/bitbake/lib/toaster/toastergui/tables.py
index d163e15..dd1748d 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -507,7 +507,8 @@ class CustomImagesTable(ToasterTable):
recipe_file_template = '''
{% if data.get_base_recipe_file %}
<code>{{data.name}}_{{data.version}}.bb</code>
- <a href="{% url 'customrecipedownload' extra.pid data.pk %}"
class="icon-download-alt get-help" title="Download recipe file"></a>
+ <a href="{% url 'customrecipedownload' extra.pid data.pk %}"
+ class="glyphicon glyphicon-download-alt get-help" title="Download
recipe file"></a>
{% endif %}'''
self.add_column(title="Recipe file",
@@ -515,18 +516,20 @@ class CustomImagesTable(ToasterTable):
static_data_template=recipe_file_template)
approx_packages_template = '''
+ {% if data.get_all_packages.count > 0 %}
<a href="{% url 'customrecipe' extra.pid data.id %}">
{{data.get_all_packages.count}}
- </a>'''
+ </a>
+ {% endif %}'''
- self.add_column(title="Approx packages",
+ self.add_column(title="Packages",
static_data_name='approx_packages',
static_data_template=approx_packages_template)
build_btn_template = '''
<button data-recipe-name="{{data.name}}"
- class="btn btn-block build-recipe-btn" style="margin-top: 5px;" >
+ class="btn btn-default btn-block build-recipe-btn">
Build
</button>'''
diff --git
a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
index 33aa8ce..b3eabe1 100644
--- a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
+++ b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
@@ -7,7 +7,7 @@
<h2>{{title}} (<span class="table-count-{{table_name}}"></span>)
{% if project.release %}
- <i class="icon-question-sign get-help heading-help" title="This page lists
{{title}} compatible with the release selected for this project, which is
{{project.release.description}}"></i>
+ <i class="glyphicon glyphicon-question-sign get-help" title="This page lists
{{title|lower}} compatible with the release selected for this project, which is
{{project.release.description}}"></i>
{% endif %}
</h2>
--
1.9.1
--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster