summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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 /bitbake/lib
parentd77c2472307a1bf489a400b9b4daefe65b9006ab (diff)
downloadpoky-9976e4f169ad39bcbe5ca34c866318d654adaa59.tar.gz
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>
Diffstat (limited to 'bitbake/lib')
-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 b906718b66..86d111db73 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -765,20 +765,7 @@ class SelectPackagesTable(PackagesTable):
765 def setup_columns(self, *args, **kwargs): 765 def setup_columns(self, *args, **kwargs):
766 super(SelectPackagesTable, self).setup_columns(*args, **kwargs) 766 super(SelectPackagesTable, self).setup_columns(*args, **kwargs)
767 767
768 add_remove_template = ''' 768 add_remove_template = '{% include "pkg_add_rm_btn.html" %}'
769 {% if data.is_locale_package %}
770 <p class="text-center">
771 <span class="muted">Locale package</span>
772 <i class="icon-question-sign get-help hover-help" title=""
773 data-original-title="This package is included in your image
774 because the locale is specified in the IMAGE_LINGUAS variable"
775 style="visibility: hidden;">
776 </i>
777 </p>
778 {% else %}
779 {% include "pkg_add_rm_btn.html" %}
780 {% endif %}
781 '''
782 769
783 self.add_column(title="Add | Remove", 770 self.add_column(title="Add | Remove",
784 hideable=False, 771 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 0d4429962e..a3e8546706 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 @@
1{# TODO move to snippets dir #}
2{% if data.is_locale_package %}
3<p class="text-center">
4 <span class="muted">Locale package</span>
5 <i class="icon-question-sign get-help hover-help" title=""
6 data-original-title="This package is included in your image
7 based on the locale specified in the IMAGE_LINGUAS variable"
8 style="visibility: hidden;">
9 </i>
10</p>
11
12{% else %}
13
1<div id="package-btn-cell-{{data.pk}}"> 14<div id="package-btn-cell-{{data.pk}}">
2 <div style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner inline-notification"></div> 15 <div style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner inline-notification"></div>
3 <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=" 16 <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 @@
17 Add package 30 Add package
18 </button> 31 </button>
19</div> 32</div>
33
34{% endif %}