[oe-commits] [bitbake] 12/19: toaster: add missing link to image recipe details

git at git.openembedded.org git at git.openembedded.org
Fri Feb 26 17:59:14 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

commit a481af693bfef0171732c18c298e285986b82de3
Author: Belen Barros Pena <belen.barros.pena at intel.com>
AuthorDate: Mon Feb 22 09:08:40 2016 +0000

    toaster: add missing link to image recipe details
    
    In the 'New custom image' page, each image recipe name listed should
    link to the corresponding image recipe details page, so that users can
    look into what packages are installed by a certain image, and decide
    based on that if they want to customise it or not.
    
    This patch adds that missing link.
    
    Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
    Signed-off-by: Elliot Smith <elliot.smith at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/toastergui/tables.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/toaster/toastergui/tables.py b/lib/toaster/toastergui/tables.py
index c0ad2b7..b51e1b4 100644
--- a/lib/toaster/toastergui/tables.py
+++ b/lib/toaster/toastergui/tables.py
@@ -589,12 +589,19 @@ class NewCustomImagesTable(ImageRecipesTable):
         self.queryset = self.queryset.filter(is_image=True)
 
     def setup_columns(self, *args, **kwargs):
+
+        name_link_template = '''
+        <a href="{% url 'recipedetails' extra.pid data.pk %}">{{data.name}}</a>
+        '''
+
         self.add_column(title="Image recipe",
                         help_text="When you build an image recipe, you get an "
                                   "image: a root file system you can"
                                   "deploy to a machine",
                         hideable=False,
                         orderable=True,
+                        static_data_name="name",
+                        static_data_template=name_link_template,
                         field_name="name")
 
         super(ImageRecipesTable, self).setup_columns(*args, **kwargs)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list