Index and deletion for generic nodes
This commit is contained in:
@@ -47,7 +47,8 @@
|
||||
<li><a role="menuitem" tabindex="-1" href="">Tasks</a></li>
|
||||
<li><a role="menuitem" tabindex="-1" href="">Profile</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a role="menuitem" tabindex="-1" href="{{url_for('node_types.index')}}">Task Types</a></li>
|
||||
<li><a role="menuitem" tabindex="-1" href="{{url_for('node_types.index')}}">Node Types</a></li>
|
||||
<li><a role="menuitem" tabindex="-1" href="{{url_for('nodes.index')}}">All Nodes</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a role="menuitem" tabindex="-1" href="">Log out</a></li>
|
||||
</ul>
|
||||
@@ -64,7 +65,7 @@
|
||||
<div class="col-md-3">
|
||||
<div class="list-group">
|
||||
<a href="{{url_for('shots.index')}}" class="list-group-item {% if title == 'shots' %}active{% endif %}">Shots</a>
|
||||
<a href="/stats" class="list-group-item {% if title == 'stats' %}active{% endif %}">Stats</a>
|
||||
<a href="#" class="list-group-item {% if title == 'stats' %}active{% endif %}">Assets</a>
|
||||
</div>
|
||||
</div><!--/end col-md-3 -->
|
||||
{% endblock %}
|
||||
|
@@ -21,6 +21,10 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<input class="btn btn-default" type="submit" value="Edit {{ node.node_type.name }}">
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default" href="#">Cancel</a>
|
||||
<a class="btn btn-danger" href="{{url_for('nodes.delete', node_id=node.id)}}">Delete</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
47
attract/application/templates/nodes/index.html
Normal file
47
attract/application/templates/nodes/index.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% extends 'layout.html' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped" id="nodes">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th width="8%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for node in nodes %}
|
||||
<tr id="row_{{node.id}}">
|
||||
<td><a href="#">{{node.name}}</a></td>
|
||||
<td>
|
||||
{% if node.description %}
|
||||
{{node.description|truncate(25)}}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-default btn-xs" href="{{url_for('nodes.edit', node_id=node.id)}}"><i class="glyphicon glyphicon-edit"></i> Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<a href="#" class="btn btn-default">Add</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user