From 1b109c7908a87bfc20c058116b6b72cc16155399 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 29 Sep 2014 20:20:33 +0100 Subject: bitbake: toastergui: project edit capabilities in all layers page This patch definitivates the all layers page, providing interactivity for adding and removing layers inside the project from this page. [YOCTO #6590] (Bitbake rev: e690080f83ad53c5e4a31e8c0fba2cc744eea1eb) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bitbake/lib/toaster/orm') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 1521717482..3c7f6611dc 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -737,6 +737,15 @@ class Layer_Version(models.Model): dirpath = models.CharField(max_length=255, null = True, default = None) # LayerBranch.vcs_subdir priority = models.IntegerField(default = 0) # if -1, this is a default layer + def get_vcs_link_url(self, file_path="/"): + if self.layer.vcs_web_file_base_url is None: + return None + return self.layer.vcs_web_file_base_url.replace('%path%', file_path).replace('%branch%', self.up_branch.name) + + def get_vcs_link_url_dirpath(self): + return self.get_vcs_link_url(self.dirpath) + + def __unicode__(self): return "LV " + str(self.layer) + " " + self.commit -- cgit v1.2.3-54-g00ecf