mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Improve detail page for unpublished layers
* Add a label making it clear the layer is unpublished * Hide recipes list header since there should never be any recipes (as the update script doesn't process unpublished layers) * Add test links for base URLs Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
47981c57ad
commit
3f60b3fba3
|
@ -26,6 +26,9 @@
|
|||
<div class="row-fluid">
|
||||
<div class="page-header">
|
||||
<h1>{{ layeritem.name }}
|
||||
{% if layeritem.status = "N" %}
|
||||
<span class="label label-warning">Unpublished</span>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<span class="pull-right">
|
||||
{% if perms.layeritem.publish_layer or useredit %}
|
||||
|
@ -131,6 +134,28 @@
|
|||
</div> <!-- end of row-fluid -->
|
||||
</div> <!-- end of container-fluid -->
|
||||
|
||||
{% if layeritem.status = 'N' %}
|
||||
<div class="container-fluid" style="margin-bottom:1em;">
|
||||
{% if layeritem.vcs_web_file_base_url %}
|
||||
<span class="label label-important">
|
||||
<a href="{{ layeritem.test_file_url }}">test file link</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="label">
|
||||
No base file URL provided
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if layeritem.vcs_web_tree_base_url %}
|
||||
<span class="label label-important">
|
||||
<a href="{{ layeritem.test_tree_url }}">test tree link</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="label">
|
||||
No base tree URL provided
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% if layeritem.machine_set.count > 0 %}
|
||||
<div class="container-fluid" style="margin-bottom:1em;">
|
||||
<div class="row-fluid">
|
||||
|
@ -191,7 +216,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endautoescape %}
|
||||
|
||||
|
|
|
@ -69,6 +69,12 @@ class LayerItem(models.Model):
|
|||
def file_url(self, path = ''):
|
||||
return self._handle_url_path(self.vcs_web_file_base_url, path)
|
||||
|
||||
def test_tree_url(self):
|
||||
return self.tree_url('conf')
|
||||
|
||||
def test_file_url(self):
|
||||
return self.file_url('conf/layer.conf')
|
||||
|
||||
def sorted_recipes(self):
|
||||
return self.recipe_set.order_by('filename')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user