aboutsummaryrefslogtreecommitdiffstats
path: root/servo/templates/accounts
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
commit63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch)
tree555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/accounts
downloadServo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip
Initial commit
First public commit
Diffstat (limited to 'servo/templates/accounts')
-rwxr-xr-xservo/templates/accounts/calendar_form.html12
-rwxr-xr-xservo/templates/accounts/calendars.html55
-rwxr-xr-xservo/templates/accounts/delete_calendar.html17
-rwxr-xr-xservo/templates/accounts/delete_calendar_event.html13
-rwxr-xr-xservo/templates/accounts/edit_calendar_event.html14
-rwxr-xr-xservo/templates/accounts/login.html22
-rwxr-xr-xservo/templates/accounts/logout.html17
-rwxr-xr-xservo/templates/accounts/orders.html59
-rwxr-xr-xservo/templates/accounts/print_calendar.html82
-rwxr-xr-xservo/templates/accounts/register.html14
-rwxr-xr-xservo/templates/accounts/settings.html46
-rwxr-xr-xservo/templates/accounts/stats.html42
-rwxr-xr-xservo/templates/accounts/tabs.html22
-rw-r--r--servo/templates/accounts/updates.html65
-rwxr-xr-xservo/templates/accounts/view_calendar.html66
15 files changed, 546 insertions, 0 deletions
diff --git a/servo/templates/accounts/calendar_form.html b/servo/templates/accounts/calendar_form.html
new file mode 100755
index 0000000..4094d01
--- /dev/null
+++ b/servo/templates/accounts/calendar_form.html
@@ -0,0 +1,12 @@
+{% extends "snippets/modal.html" %}
+
+{% block header %}
+ {{ title }}
+{% endblock header %}
+
+{% block body %}
+ <form method="post" action="{{ action }}" accept-charset="utf-8" class="form-horizontal">
+ {% csrf_token %}
+ {% include "form_snippet.html" %}
+ </form>
+{% endblock body %}
diff --git a/servo/templates/accounts/calendars.html b/servo/templates/accounts/calendars.html
new file mode 100755
index 0000000..c10276c
--- /dev/null
+++ b/servo/templates/accounts/calendars.html
@@ -0,0 +1,55 @@
+{% extends "accounts/orders.html" %}
+{% load i18n %}
+{% load servo_tags %}
+
+{% block toolbar %}
+<div class="btn-group">
+ <a href="{% url 'calendars-create' username=request.user.username %}" data-modal="#modal" class="btn"><i class="icon-plus"></i> {% trans "New Calendar" %}</a>
+{% if calendar %}
+ <a href="{% url 'calendars.event.edit' username=request.user.username cal_pk=calendar.pk %}" class="btn">{% trans "New Event" %}</a>
+{% endif %}
+</div>
+
+<div class="btn-group">
+{% if calendar %}
+ <a href="print/" class="btn window"><i class="icon-print"></i> {% trans "Print" %}</a>
+ <a href="{% url 'calendars-edit' request.user.username calendar.pk view %}" data-modal="#modal" class="btn"><i class="icon-pencil"></i> {% trans "Edit" %}</a>
+ {% if perms.servo.delete_calendar %}
+ <a href="{{ calendar.get_absolute_url }}delete/" data-modal="#modal" class="btn"><i class="icon-trash"></i> {% trans "Delete" %}</a>
+ {% else %}
+ <a href="" class="btn disabled">{% trans "Delete" %}</a>
+ {% endif %}
+{% endif %}
+</div>
+
+<div class="btn-group">
+ <a href="download/" class="btn {% if not calendar %}disabled{% endif %}"><i class="icon-download"></i> {% trans "Download" %}</a>
+</div>
+
+{% endblock toolbar %}
+
+{% block second_row %}
+
+<div class="row-fluid">
+ <div class="span3">
+ <ul class="nav nav-list">
+ <li class="nav-header">{% trans "Calendars" %}</li>
+ {% for c in calendars %}
+ <li class="{% active request c.pk '/' %}">
+ <a href="{% url 'calendars.view' pk=c.pk username=request.user.username view='week' %}">{{ c.title }}<span class="badge pull-right">{{ c.get_unfinished_count }}</span></a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+
+ <div class="span9">
+ {% block detail_view %}
+ <h1 class="muted text-center">{% trans "No calendar selected" %}</h1>
+ {% endblock detail_view %}
+ </div>
+</div>
+{% endblock second_row %}
+
+{% block crumbs %}
+ <li class="active"><a href="{% url 'calendars-list' username=request.user.username %}">{% trans "Calendars" %}</a></li>
+{% endblock crumbs %}
diff --git a/servo/templates/accounts/delete_calendar.html b/servo/templates/accounts/delete_calendar.html
new file mode 100755
index 0000000..bae2e16
--- /dev/null
+++ b/servo/templates/accounts/delete_calendar.html
@@ -0,0 +1,17 @@
+{% extends "snippets/modal.html" %}
+{% load i18n %}
+
+{% block header %}
+ {{ title }}
+{% endblock header %}
+
+{% block body %}
+ {% trans "This will also delete all events in this calendar" %}
+{% endblock body %}
+
+{% block footer %}
+ <form method="post" action="{{ action }}">
+ {% csrf_token %}
+ <button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
+ </form>
+{% endblock footer %}
diff --git a/servo/templates/accounts/delete_calendar_event.html b/servo/templates/accounts/delete_calendar_event.html
new file mode 100755
index 0000000..58fbef3
--- /dev/null
+++ b/servo/templates/accounts/delete_calendar_event.html
@@ -0,0 +1,13 @@
+{% extends "snippets/modal.html" %}
+{% load i18n %}
+
+{% block header %}
+ {{ title }}
+{% endblock header %}
+
+{% block footer %}
+ <form action="{{ action }}" method="post">
+ {% csrf_token %}
+ <button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
+ </form>
+{% endblock footer %}
diff --git a/servo/templates/accounts/edit_calendar_event.html b/servo/templates/accounts/edit_calendar_event.html
new file mode 100755
index 0000000..7316791
--- /dev/null
+++ b/servo/templates/accounts/edit_calendar_event.html
@@ -0,0 +1,14 @@
+{% extends "accounts/calendars.html" %}
+
+{% block detail_view %}
+ <form action="" method="post" accept-charset="utf-8">
+ {% csrf_token %}
+ {% include "form_field_snippet.html" with field=form.started_at %}
+ <div class="input-append">
+ {{ form.finished_at }}
+ <button class="btn" type="button" id="set_dt"><i class="icon-time"></i></button>
+ </div>
+ {% include "form_field_snippet.html" with field=form.notes %}
+ {% include "form_buttons.html" %}
+ </form>
+{% endblock detail_view %}
diff --git a/servo/templates/accounts/login.html b/servo/templates/accounts/login.html
new file mode 100755
index 0000000..80ba716
--- /dev/null
+++ b/servo/templates/accounts/login.html
@@ -0,0 +1,22 @@
+{% extends "login.html" %}
+{% load i18n %}
+
+{% block content %}
+<img src="{{ STATIC_URL }}images/logo_servoapp.png" class="servo-logo" alt=""/>
+<form action="{% url "accounts-login" %}" method="post" accept-charset="utf-8">
+ {% csrf_token %}
+ <div class="input-prepend">
+ <span class="add-on"><i class="icon-user"></i></span>
+ {{ form.username }}
+ </div>
+ <div class="input-prepend">
+ <span class="add-on"><i class="icon-lock"></i></span>
+ {{ form.password }}
+ </div>
+ <br/>
+ <div class="pull-right">
+ <a class="btn btn" href="{% url 'checkin-index' %}">{% trans "Check-in" %}</a>
+ <button class="btn btn-primary" type="submit">{% trans "Login" %}</button>
+ </div>
+</form>
+{% endblock content %}
diff --git a/servo/templates/accounts/logout.html b/servo/templates/accounts/logout.html
new file mode 100755
index 0000000..1b64d45
--- /dev/null
+++ b/servo/templates/accounts/logout.html
@@ -0,0 +1,17 @@
+{% extends "modal.html" %}
+{% load i18n %}
+
+{% block header %}
+{% trans "Logging out?" %}
+{% endblock header %}
+
+{% block body %}
+{% trans "This will terminate your Servo session." %}
+{% endblock body %}
+
+{% block footer %}
+<form action="{% url 'accounts-logout' %}" method="post">
+ {% csrf_token %}
+ <button type="submit" class="btn btn-danger">{% trans "Log out" %}</button>
+</form>
+{% endblock footer %}
diff --git a/servo/templates/accounts/orders.html b/servo/templates/accounts/orders.html
new file mode 100755
index 0000000..8420ad8
--- /dev/null
+++ b/servo/templates/accounts/orders.html
@@ -0,0 +1,59 @@
+{% extends "default.html" %}
+{% load i18n %}
+{% load servo_tags %}
+
+{% block toolbar %}
+{% if perms.servo.add_order %}
+ <a href="{% url 'orders-create' %}" class="btn"><i class="icon-plus"></i> {% trans "Create Order" %}</a>
+{% endif %}
+{% endblock toolbar %}
+
+{% block content %}
+<div class="page-header clearfix">
+ <div class="pull-left">
+ <h2><i class="glyphicons-icon home"></i> {{ title }}<br/><small style="margin-left:60px">{{ subtitle }}</small></h2>
+ </div>
+ <form class="form-search pull-right">
+ <div class="input-append">
+ <input type="text" class="search-query filter" placeholder="{% trans "Filter results" %}"/>
+ <button type="button" class="btn" data-toggle="collapse" data-target="#collapsable"><i class="icon-search"></i></button>
+ </div>
+ </form>
+</div>
+
+<div class="row-fluid">
+ <div class="span12">
+ {% include "accounts/tabs.html" %}
+ </div>
+</div>
+
+{% block second_row %}
+
+<div id="collapsable" class="collapse out">
+ <div class="well clearfix">
+ <form action="" method="get" class="form-inline">
+ {% for field in form %}
+ <div class="control-group pull-left">
+ <label class="control-label">{{ field.label }}</label>
+ <div class="controls">{{ field }}</div>
+ </div>
+ {% endfor %}
+ <p class="clearfix"><hr/></p>
+ <div class="pull-right">
+ <a class="btn" href="{% url 'accounts-list_orders' username=request.user.username %}?user=state=1&amp;user={{ request.user.pk }}"><i class="icon-refresh"></i> {% trans "Reset" %}</a>
+ <button class="btn btn-primary" type="submit"><i class="icon-search icon-white"></i> {% trans "Search" %}</button>
+ </div>
+ </form>
+ </div>
+</div>
+{% block second_column %}
+ {% include "orders/list.html" %}
+{% endblock second_column %}
+</div>
+{% endblock second_row %}
+
+{% endblock content %}
+
+{% block crumbs %}
+<li class="active">{% trans "Orders" %}</li>
+{% endblock crumbs %}
diff --git a/servo/templates/accounts/print_calendar.html b/servo/templates/accounts/print_calendar.html
new file mode 100755
index 0000000..64edbe3
--- /dev/null
+++ b/servo/templates/accounts/print_calendar.html
@@ -0,0 +1,82 @@
+{% extends "default_print.html" %}
+{% load servo_tags %}
+{% load mptt_tags %}
+{% load static %}
+{% load i18n %}
+
+{% block content %}
+<div class="row">
+ <div class="span4">
+ {% if location.logo %}
+ <img src="{% get_media_prefix %}{{ location.logo }}" alt="logo" title="logo" class="media-object pull-left span2" style="margin:10px"/>
+ {% endif %}
+ </div>
+ <div class="span4">
+ {{ location.title }}<br/>
+ {{ location.address }}<br/>
+ {{ location.zip_code }}, {{ location.city }}<br/>
+ {{ location.notes }}
+ </div>
+ <div class="span4">
+ {% block location_info %}
+ {% endblock location_info %}
+ {% trans "Email Address" %}: {{ location.email }}<br/>
+ {% trans "Phone" %}: {{ location.phone }}<br/><br/>
+ </div>
+</div>
+<div class="row" style="margin-top:2em;margin-bottom:1em">
+ <div class="span6">
+ {% trans "Employee" %}: {{ calendar.user.get_full_name }}<br/>
+ {% trans "Date" %}: {% now "SHORT_DATE_FORMAT" %}
+ </div>
+</div>
+<div class="row">
+ <div class="span12 text-center"><h3>{{ title }}</h3></div>
+</div>
+<div class="row">
+ <div class="span12">
+ <table class="table">
+ <thead>
+ <tr>
+ <th>{% trans "Date" %}</th>
+ <th>{% trans "Started At" %}</th>
+ <th>{% trans "Finished At" %}</th>
+ <th>{% trans "Duration" %}</th>
+ <th>{% trans "Notes" %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for i in events %}
+ <tr>
+ <td>{% ifchanged i.started_at|date %}{{ i.started_at|date:"SHORT_DATE_FORMAT" }}{% endifchanged %}</td>
+ <td>{{ i.started_at|time:"TIME_FORMAT" }}</td>
+ <td>{{ i.finished_at|time:"TIME_FORMAT"|default:"-" }}</td>
+ <td>{{ i.get_duration }}</td>
+ <td>{{ i.notes|default:'' }}</td>
+ </tr>
+ {% empty %}
+ <tr><td colspan="6" class="muted empty">{% trans "No events found" %}</td></tr>
+ {% endfor %}
+ </tbody>
+ <tfoot>
+ <tr>
+ <td><strong>{% trans "Total" %}</strong></td>
+ <td colspan="4"><strong>{{ subtitle }}</strong></td>
+ </tr>
+ </tfoot>
+ </table>
+ </div>
+</div>
+<br/>
+<br/>
+<div class="row">
+ <div class="span6">
+ <hr/>
+ {% trans "Manager" %}
+ </div>
+ <div class="span6">
+ <hr/>
+ {% trans "Employee" %}
+ </div>
+</div>
+{% endblock content %}
diff --git a/servo/templates/accounts/register.html b/servo/templates/accounts/register.html
new file mode 100755
index 0000000..e1410ff
--- /dev/null
+++ b/servo/templates/accounts/register.html
@@ -0,0 +1,14 @@
+{% extends "login.html" %}
+{% load i18n %}
+
+{% block content %}
+ <form method="post" action="">
+ <h2>{% trans "Register" %}</h2>
+ {% csrf_token %}
+ {% include "form_snippet.html" %}
+ <div class="pull-right">
+ <a href="/login/" class="btn">{% trans "Back" %}</a>
+ <button type="submit" class="btn btn-primary">{% trans "Submit" %}</button>
+ </div>
+ </form>
+{% endblock content %}
diff --git a/servo/templates/accounts/settings.html b/servo/templates/accounts/settings.html
new file mode 100755
index 0000000..a48ab19
--- /dev/null
+++ b/servo/templates/accounts/settings.html
@@ -0,0 +1,46 @@
+{% extends "accounts/orders.html" %}
+{% load i18n %}
+
+{% block first_column %}
+{% endblock first_column %}
+
+{% block second_row %}
+<form action="" method="post" accept-charset="utf-8" class="form-horizontal" enctype="multipart/form-data">{% csrf_token %}
+ <ul class="nav nav-tabs">
+ <li class="active"><a href="#tab1" data-toggle="tab">{% trans "Profile" %}</a></li>
+ <li><a href="#tab2" data-toggle="tab">{% trans "Locale" %}</a></li>
+ <li><a href="#tab3" data-toggle="tab">{% trans "Password" %}</a></li>
+ <li><a href="#tab4" data-toggle="tab">{% trans "GSX" %}</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active" id="tab1">
+ {% include "form_field_snippet.html" with field=form.location %}
+ {% include "form_field_snippet.html" with field=form.queues %}
+ {% include "form_field_snippet.html" with field=form.should_notify %}
+ {% include "form_field_snippet.html" with field=form.notify_by_email %}
+ {% include "form_field_snippet.html" with field=form.autoprint %}
+ {% include "form_field_snippet.html" with field=form.photo %}
+ </div>
+ <div class="tab-pane" id="tab2">
+ {% include "form_field_snippet.html" with field=form.locale %}
+ {% include "form_field_snippet.html" with field=form.region %}
+ {% include "form_field_snippet.html" with field=form.timezone %}
+ </div>
+ <div class="tab-pane" id="tab3">
+ {% include "form_field_snippet.html" with field=form.password1 %}
+ {% include "form_field_snippet.html" with field=form.password2 %}
+ </div>
+ <div class="tab-pane" id="tab4">
+ {% include "form_field_snippet.html" with field=form.tech_id %}
+ {% include "form_field_snippet.html" with field=form.gsx_userid %}
+ {% include "form_field_snippet.html" with field=form.gsx_password %}
+ {% include "form_field_snippet.html" with field=form.gsx_poprefix %}
+ </div>
+ </div>
+ {% include "form_buttons.html" %}
+</form>
+{% endblock second_row %}
+
+{% block crumbs %}
+ <li class="active">{% trans "Settings" %}</li>
+{% endblock crumbs %}
diff --git a/servo/templates/accounts/stats.html b/servo/templates/accounts/stats.html
new file mode 100755
index 0000000..d56e1a5
--- /dev/null
+++ b/servo/templates/accounts/stats.html
@@ -0,0 +1,42 @@
+{% extends "accounts/orders.html" %}
+{% load i18n %}
+
+{% block second_row %}
+<div class="row-fluid">
+ <div class="span12 well">
+ {% block filter_block %}
+ <form action="#" method="post" class="form-inline" id="stats-form">
+ {% csrf_token %}
+ {% for field in form %}
+ <div class="control-group pull-left">
+ <label class="control-label">{{ field.label }}</label>
+ <div class="controls">{{ field }}</div>
+ </div>
+ {% endfor %}
+ <div class="control-group">
+ <label class="control-label">&nbsp;</label>
+ <div class="controls">
+ <button class="btn btn-primary pull-right" type="submit"><i class="icon-search icon-white"></i> {% trans "Search" %}</button>
+ </div>
+ </div>
+ </form>
+ {% endblock filter_block %}
+ </div>
+</div>
+
+<div class="resizable">
+ <h2>{% trans "Runrate" %}</h2>
+ <p>{% trans "Shows you how many you've been assigned to during the selected period, averaged over the time scale." %}</p>
+ <div class="plot" data-source="/stats/data/runrate/personal/"></div>
+ <div class="legend-container"></div>
+</div>
+{% endblock second_row %}
+
+{% block media %}
+<script src="{{ STATIC_URL }}js/flot/jquery.flot.min.js"></script>
+<script src="{{ STATIC_URL }}js/flot/jquery.flot.time.min.js"></script>
+<script src="{{ STATIC_URL }}js/flot/jquery.flot.pie.min.js"></script>
+<script src="{{ STATIC_URL }}js/flot/jquery.flot.resize.min.js"></script>
+<script src="{{ STATIC_URL }}js/jquery.flot.tooltip.min.js"></script>
+<script src="{{ STATIC_URL }}js/stats.js" type="text/javascript"></script>
+{% endblock media %}
diff --git a/servo/templates/accounts/tabs.html b/servo/templates/accounts/tabs.html
new file mode 100755
index 0000000..4444ab8
--- /dev/null
+++ b/servo/templates/accounts/tabs.html
@@ -0,0 +1,22 @@
+{% load i18n %}
+{% load servo_tags %}
+
+<ul class="nav nav-tabs">
+{% with request.user.username as username %}
+ <li class="{% active request "orders" %}">
+ <a href="{% url 'accounts-list_orders' username=username %}">{% trans "Orders" %}</a>
+ </li>
+ <li class="{% active request "updates" %}">
+ <a href="{% url 'accounts-updates' username=username %}">{% trans "Updates" %}</a>
+ </li>
+ <li class="{% active request "calendars" %}">
+ <a href="{% url 'calendars-list' username=username %}">{% trans "Calendars" %}</a>
+ </li>
+ <li class="{% active request "stats" %}">
+ <a href="{% url 'accounts-stats' username=username %}">{% trans "Statistics" %}</a>
+ </li>
+ <li class="{% active request "settings" %}">
+ <a href="{% url 'accounts-settings' username=username %}">{% trans "Settings" %}</a>
+ </li>
+{% endwith %}
+</ul>
diff --git a/servo/templates/accounts/updates.html b/servo/templates/accounts/updates.html
new file mode 100644
index 0000000..121aea9
--- /dev/null
+++ b/servo/templates/accounts/updates.html
@@ -0,0 +1,65 @@
+{% extends "default.html" %}
+{% load humanize %}
+{% load i18n %}
+
+{% block toolbar %}
+{% if perms.servo.add_order %}
+ <a href="{% url 'accounts-clear_notifications' request.user.username %}?t={% now "Y/m/d/H/i" %}" class="btn"><i class="icon-ok"></i> {% trans "Clear all" %}</a>
+{% endif %}
+{% endblock toolbar %}
+
+{% block content %}
+<div class="page-header clearfix">
+ <div class="pull-left">
+ <h2><i class="glyphicons-icon home"></i> {{ title }}<br/><small style="margin-left:60px">{{ subtitle }}</small></h2>
+ </div>
+</div>
+<div class="row-fluid">
+ <div class="span12">
+ {% include "accounts/tabs.html" %}
+ </div>
+</div>
+{% block second_row %}
+<div class="row-fluid">
+ <div class="span3">
+ <ul class="nav nav-list">
+ <li class="nav-header">{% trans "Updates" %}</li>
+ <li {% if kind == 'note_added' %}class="active"{% endif %}><a href="?kind=note_added">{% trans "Messages" %}</a></li>
+ <li {% if kind == 'set_status' %}class="active"{% endif %}><a href="?kind=set_status">{% trans "Statuses" %}</a></li>
+ </ul>
+ </div>
+ <div class="span9">
+ <table class="table">
+ <thead>
+ <tr>
+ <th style="width:25px"></th>
+ <th>{% trans "Event" %}</th>
+ <th style="width:100px">{% trans "Order" %}</th>
+ <th style="width:150px"></th>
+ <th style="width:24px"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for event in events %}
+ <tr>
+ <td><img src="{{ STATIC_URL }}images/{{ event.get_icon }}.png" alt="{{ event.description }}" class="icon"/></td>
+ <td>{{ event.description }}</td>
+ <td><a href="{{ event.content_object.get_absolute_url }}">{{ event.content_object }}</a></td>
+ <td style="text-align:right">{{ event.triggered_by }}<br/>
+ <small class="muted">{{ event.triggered_at|naturaltime }}</small></td>
+ <td><a class="btn {% if event.handled_at %}disabled{% endif %}" href="{% url 'events-ack_event' event.pk %}?return=0"><i class="icon-ok"></i></a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% include "pagination.html" with items=events %}
+ </div>
+</div>
+
+{% endblock second_row %}
+
+{% endblock content %}
+
+{% block crumbs %}
+<li class="active">{% trans "Updates" %}</li>
+{% endblock crumbs %}
diff --git a/servo/templates/accounts/view_calendar.html b/servo/templates/accounts/view_calendar.html
new file mode 100755
index 0000000..2b063e2
--- /dev/null
+++ b/servo/templates/accounts/view_calendar.html
@@ -0,0 +1,66 @@
+{% extends "accounts/calendars.html" %}
+{% load i18n %}
+{% load servo_tags %}
+
+{% block detail_view %}
+
+<div class="text-center">
+{% block view_block %}
+<div class="btn-group">
+ <a class="btn {% active request 'day' %}" href="{{ calendar.get_absolute_url }}day/">{% trans "Day" %}</a>
+ <a class="btn {% active request 'week' %}" href="{{ calendar.get_absolute_url }}week/">{% trans "Week" %}</a>
+ <a class="btn {% active request 'month' %}" href="{{ calendar.get_absolute_url }}month/">{% trans "Month" %}</a>
+</div>
+{% endblock view_block %}
+
+{% block browse_block %}
+<div class="btn-group pull-right">
+ <a href="{% url 'calendars-view_calendar' username=request.user.username pk=calendar.pk view=view start_date=previous|date:'Y-m-d' %}" class="btn"><i class="icon-chevron-left"></i></a>
+ <a href="{{ base_url }}" class="btn">{% trans "Today" %}</a>
+ <a href="{% url 'calendars-view_calendar' username=request.user.username pk=calendar.pk view=view start_date=next|date:'Y-m-d' %}" class="btn"><i class="icon-chevron-right"></i></a>
+</div>
+{% endblock browse_block %}
+</div>
+
+<table class="table">
+ <thead>
+ <tr>
+ <th>{% trans "Date" %}</th>
+ <th>{% trans "Started At" %}</th>
+ <th>{% trans "Finished At" %}</th>
+ <th>{% trans "Duration" %}</th>
+ <th>{% trans "Notes" %}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for i in events %}
+ <tr>
+ <td>{% ifchanged i.started_at|date %}{{ i.started_at|date:"SHORT_DATE_FORMAT" }}{% endifchanged %}</td>
+ <td>{{ i.started_at|time:"TIME_FORMAT" }}</td>
+ <td>{{ i.finished_at|time:"TIME_FORMAT"|default:"-" }}</td>
+ <td>{{ i.get_duration }}</td>
+ <td>{{ i.notes|default:'' }}</td>
+ <td style="text-align:right">
+ <div class="btn-group">
+ {% if i.finished_at %}
+ <a href="" class="btn disabled"><i class="icon-time"></i></a>
+ {% else %}
+ <a href="{{ calendar.get_absolute_url }}events/{{ i.pk }}/finish/" class="btn"><i class="icon-time"></i></a>
+ {% endif %}
+ <a href="{{ calendar.get_absolute_url }}events/{{ i.pk }}/edit/" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
+ <a href="{{ calendar.get_absolute_url }}events/{{ i.pk }}/delete/" class="btn btn-danger" data-modal="#modal"><i class="icon-trash icon-white"></i></a>
+ </div>
+ </td>
+ </tr>
+ {% empty %}
+ <tr><td colspan="6" class="muted empty">{% trans "No events found" %}</td></tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endblock detail_view %}
+
+{% block crumbs %}
+ <li><a href="{% url 'calendars-list' username=request.user.username %}">{% trans "Calendars" %}</a> <span class="divider">/</span></li>
+ <li class="active">{{ calendar.title }}</li>
+{% endblock crumbs %}