summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/tables.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-21 17:11:11 +0000
committerbrian avery <avery.brian@gmail.com>2016-02-08 12:48:14 -0800
commitb2208e53c00a67a7d0345e7378e6806b8ae40fb4 (patch)
tree89863f69191c326e8fdf070c7bb10a955d9d7bae /lib/toaster/toastergui/tables.py
parent38a753e7b2e9ede326856b830b25e13bdd6d0d9b (diff)
downloadbitbake-b2208e53c00a67a7d0345e7378e6806b8ae40fb4.tar.gz
toaster: make locale packages uneditable in custom image page
When the packages associated with a custom image recipe are shown in the customrecipe editing page, locale packages are shown in the same way as all other packages. This gives the false impression that these packages can be removed, when in fact they are automatically added due to the IMAGE_LINGUAS build variable. Modify the customrecipe page so that locale packages cannot be removed, and provide some help text explaining why. [YOCTO #8927] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com>
Diffstat (limited to 'lib/toaster/toastergui/tables.py')
-rw-r--r--lib/toaster/toastergui/tables.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/toaster/toastergui/tables.py b/lib/toaster/toastergui/tables.py
index b73f459b2..b906718b6 100644
--- a/lib/toaster/toastergui/tables.py
+++ b/lib/toaster/toastergui/tables.py
@@ -765,12 +765,27 @@ 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 %}
+ '''
+
self.add_column(title="Add | Remove",
hideable=False,
help_text="Use the add and remove buttons to modify "
"the package content of your custom image",
static_data_name="add_rm_pkg_btn",
- static_data_template='{% include "pkg_add_rm_btn.html" %}',
+ static_data_template=add_remove_template,
filter_name='in_current_image_filter')
def setup_filters(self, *args, **kwargs):