aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py9
-rw-r--r--bitbake/lib/toaster/toastergui/templates/toastertable.html2
2 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 8dda1fd4a1a..22953d065e1 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -478,7 +478,16 @@ class CustomImagesTable(ToasterTable):
def get_context_data(self, **kwargs):
context = super(CustomImagesTable, self).get_context_data(**kwargs)
+
+ empty_state_template = '''
+ You have not created any custom images yet.
+ <a href="{% url 'newcustomimage' data.pid %}">
+ Create your first custom image</a>
+ '''
+ context['empty_state'] = self.render_static_data(empty_state_template,
+ kwargs)
project = Project.objects.get(pk=kwargs['pid'])
+
# TODO put project into the ToasterTable base class
context['project'] = project
return context
diff --git a/bitbake/lib/toaster/toastergui/templates/toastertable.html b/bitbake/lib/toaster/toastergui/templates/toastertable.html
index d85d01f1570..aa148955e4f 100644
--- a/bitbake/lib/toaster/toastergui/templates/toastertable.html
+++ b/bitbake/lib/toaster/toastergui/templates/toastertable.html
@@ -26,7 +26,7 @@
{% include 'toastertable-filter.html' %}
<div class="row-fluid" id="empty-state-{{table_name}}" style="display:none">
- <div class="alert alert-info">{{empty_state}}</div>
+ <div class="alert alert-info">{{empty_state|safe}}</div>
</div>
<div id="no-results-{{table_name}}" style="display:none">