diff options
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 14 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/css/default.css | 3 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/tables.py | 17 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html | 2 |
4 files changed, 34 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 1cf997cfe5..b70fa18feb 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -749,6 +749,20 @@ class Package(models.Model): | |||
749 | section = models.CharField(max_length=80, blank=True) | 749 | section = models.CharField(max_length=80, blank=True) |
750 | license = models.CharField(max_length=80, blank=True) | 750 | license = models.CharField(max_length=80, blank=True) |
751 | 751 | ||
752 | @property | ||
753 | def is_locale_package(self): | ||
754 | """ Returns True if this package is identifiable as a locale package """ | ||
755 | if self.name.find('locale') != -1: | ||
756 | return True | ||
757 | return False | ||
758 | |||
759 | @property | ||
760 | def is_packagegroup(self): | ||
761 | """ Returns True is this package is identifiable as a packagegroup """ | ||
762 | if self.name.find('packagegroup') != -1: | ||
763 | return True | ||
764 | return False | ||
765 | |||
752 | class CustomImagePackage(Package): | 766 | class CustomImagePackage(Package): |
753 | # CustomImageRecipe fields to track pacakges appended, | 767 | # CustomImageRecipe fields to track pacakges appended, |
754 | # included and excluded from a CustomImageRecipe | 768 | # included and excluded from a CustomImageRecipe |
diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index bc8a97bedc..b674a9de8e 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css | |||
@@ -153,6 +153,9 @@ select { width: auto; } | |||
153 | /* make tables Chrome-happy (me, not so much) */ | 153 | /* make tables Chrome-happy (me, not so much) */ |
154 | table { table-layout: fixed; word-wrap: break-word; } | 154 | table { table-layout: fixed; word-wrap: break-word; } |
155 | 155 | ||
156 | table p { margin-bottom: 0 } | ||
157 | .table td { vertical-align: middle; } | ||
158 | |||
156 | /* styles for the new build button */ | 159 | /* styles for the new build button */ |
157 | .new-build .btn-primary { padding: 4px 30px; } | 160 | .new-build .btn-primary { padding: 4px 30px; } |
158 | .new-build .alert { margin-top: 10px; } | 161 | .new-build .alert { margin-top: 10px; } |
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index b73f459b2c..b906718b66 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py | |||
@@ -765,12 +765,27 @@ 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 = ''' | ||
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 | |||
768 | self.add_column(title="Add | Remove", | 783 | self.add_column(title="Add | Remove", |
769 | hideable=False, | 784 | hideable=False, |
770 | help_text="Use the add and remove buttons to modify " | 785 | help_text="Use the add and remove buttons to modify " |
771 | "the package content of your custom image", | 786 | "the package content of your custom image", |
772 | static_data_name="add_rm_pkg_btn", | 787 | static_data_name="add_rm_pkg_btn", |
773 | static_data_template='{% include "pkg_add_rm_btn.html" %}', | 788 | static_data_template=add_remove_template, |
774 | filter_name='in_current_image_filter') | 789 | filter_name='in_current_image_filter') |
775 | 790 | ||
776 | def setup_filters(self, *args, **kwargs): | 791 | def setup_filters(self, *args, **kwargs): |
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 493456f855..0d4429962e 100644 --- a/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html +++ b/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html | |||
@@ -7,7 +7,7 @@ | |||
7 | "> | 7 | "> |
8 | <i class="icon-trash no-tooltip"></i> | 8 | <i class="icon-trash no-tooltip"></i> |
9 | Remove package | 9 | Remove package |
10 | </a> | 10 | </button> |
11 | <button class="btn btn-block add-rm-package-btn" data-directive="add" data-package="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" data-name="{{data.name}}" style=" | 11 | <button class="btn btn-block add-rm-package-btn" data-directive="add" data-package="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" data-name="{{data.name}}" style=" |
12 | {% if data.pk in extra.current_packages %} | 12 | {% if data.pk in extra.current_packages %} |
13 | display:none | 13 | display:none |