summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-01-28 18:05:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 13:29:20 +0000
commit9976e4f169ad39bcbe5ca34c866318d654adaa59 (patch)
treeb670d9bfbbbf0eda88b13d71d56ad0421da03d37
parentd77c2472307a1bf489a400b9b4daefe65b9006ab (diff)
downloadpoky-contrib-9976e4f169ad39bcbe5ca34c866318d654adaa59.tar.gz
poky-contrib-9976e4f169ad39bcbe5ca34c866318d654adaa59.tar.bz2
poky-contrib-9976e4f169ad39bcbe5ca34c866318d654adaa59.zip
bitbake: toaster: tables move template logic into the pkg_add_rm_btn
Instead of defining this as a string it's sufficiently large enough to warrant its own file. (Bitbake rev: 6b39423fe5a3ed30289a8b303329a5725f7d273b) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py15
-rw-r--r--bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html15
2 files changed, 16 insertions, 14 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index b906718b665..86d111db736 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -765,20 +765,7 @@ class SelectPackagesTable(PackagesTable):
def setup_columns(self, *args, **kwargs):
super(SelectPackagesTable, self).setup_columns(*args, **kwargs)
- add_remove_template = '''
- {% if data.is_locale_package %}
- <p class="text-center">
- <span class="muted">Locale package</span>
- <i class="icon-question-sign get-help hover-help" title=""
- data-original-title="This package is included in your image
- because the locale is specified in the IMAGE_LINGUAS variable"
- style="visibility: hidden;">
- </i>
- </p>
- {% else %}
- {% include "pkg_add_rm_btn.html" %}
- {% endif %}
- '''
+ add_remove_template = '{% include "pkg_add_rm_btn.html" %}'
self.add_column(title="Add | Remove",
hideable=False,
diff --git a/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html b/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
index 0d4429962e1..a3e8546706f 100644
--- a/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
+++ b/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
@@ -1,3 +1,16 @@
+{# TODO move to snippets dir #}
+{% if data.is_locale_package %}
+<p class="text-center">
+ <span class="muted">Locale package</span>
+ <i class="icon-question-sign get-help hover-help" title=""
+ data-original-title="This package is included in your image
+ based on the locale specified in the IMAGE_LINGUAS variable"
+ style="visibility: hidden;">
+ </i>
+</p>
+
+{% else %}
+
<div id="package-btn-cell-{{data.pk}}">
<div style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner inline-notification"></div>
<button class="btn btn-block btn-danger add-rm-package-btn" data-directive="remove" data-package="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" data-name="{{data.name}}" style="
@@ -17,3 +30,5 @@
Add package
</button>
</div>
+
+{% endif %}