Add "edit" button on list page

This commit is contained in:
boyska 2015-02-24 12:22:46 +01:00
parent 08b4687309
commit b5a100f9e7
No known key found for this signature in database
GPG key ID: 7395DCAE58289CA9
3 changed files with 33 additions and 6 deletions

View file

@ -1,4 +1,20 @@
{% extends "bootstrap/base.html" %}
{%block styles%}
{{super()}}
<link href="https://code.jquery.com/ui/1.11.3/themes/ui-lightness/jquery-ui.css"
rel="stylesheet" media="screen">
{%endblock%}
{%block scripts%}
{{super()}}
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"
type="text/javascript">
</script>
<script type="text/javascript">
$(function() {
$('.button').button({});
});
</script>
{%endblock%}
{% block title %}Larigira{% endblock title %}
{% block navbar %}
<nav class="navbar navbar-default">

View file

@ -1,8 +1,6 @@
{% extends "dbadmin_base.html" %}
{%block styles %}
{{super()}}
<link href="https://code.jquery.com/ui/1.11.3/themes/ui-lightness/jquery-ui.css"
rel="stylesheet" media="screen">
<style>
#selected {
margin: 5px;
@ -13,8 +11,6 @@
{%endblock styles%}
{%block scripts %}
{{super()}}
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"
type="text/javascript">
</script>
<script type="text/javascript">
var my_id = {{alarm.eid}};

View file

@ -1,4 +1,17 @@
{% extends "dbadmin_base.html" %}
{%block scripts%}
{{super()}}
<script type="text/javascript">
$(function() {
$('.button').button({
icons: {
primary: 'ui-icon-pencil'
}
});
});
</script>
{%endblock%}
{% block title %}Larigira - DB list {%endblock%}
{% block content %}
@ -6,8 +19,10 @@
{% for e, actions in events %}
<div class="event row">
<div class="col-md-8">
<h2>Event {{e.eid}} <small>{{e.nick if 'nick'}}</small></h2>
{{dict_table(e, ['nick', 'actions'])}}
<h2>Event {{e.eid}} <small>{{e.nick if 'nick'}}</small>
</h2>
<a class="button" href="{{url_for('db.edit_event', alarmid=e.eid)}}">Edit</a>
{{dict_table(e, ['nick', 'actions'])}}
</div>
<div class="actions col-md-4">