{% extends g.theme.master %}
{% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Link is not configured{% endblock %}
{% block header %}{{c.app.config.options.mount_label}}{% endblock %}
{% block short_url_content %}{% endblock %}
{% block content %}
<table>
<thead>
<tr>
<th>Private</th>
<th>Create user</th>
<th>Short URL</th>
<th>Full URL</th>
<th>Description</th>
<th>Created</th>
<th>Last updated</th>
</tr>
</thead>
{% for su in short_urls %}
<tr>
{%if su.private %}
<td><small>yes</small></td>
{% else %}
<td><small>no</small></td>
{% endif %}
<td><small>{{ su.user.username }}</small></td>
<td><small><a href="{{ c.app.url+su.short_name }}">{{ request.scheme+'://'+request.host+c.app.url+su.short_name}}</a></small></td>
<td><small>{{ su.url|urlize(20) }}</small></td>
<td><small>{{ su.description }}</small></td>
<td><small>{{ su.created }}</small></td>
<td><small>{{ su.last_updated }}</small></td>
</tr>
{% endfor %}
</table>
{{ c.page_list.display(limit=limit, count=count, page=pagenum) }}
{% endblock %}
{% block extra_js %}
{{c.create_short_url_lightbox.display(content='''
<div>
<h1>Add Short URL</h1>
<form method="post" action="{{c.project.url()}}admin/{{app.config.options.mount_point}}/add">
<label class="grid-13">Short name</label>
<div class="grid-13"><input type = "text" name = "short_url" style="width: 250px"></div>
<label class="grid-13">Full URL</label>
<div class="grid-13"><input type = "text" name = "full_url" style="width: 250px"></div>
<label class="grid-13">Description</label>
<div class="grid-13"><textarea name = "description" style="width: 250px; height: 100px"></textarea></div>
<div class="grid-1"><input type = "checkbox" name="private" id="private"></div>
<label for="private" class="grid-12">Private</label>
<div class="grid-13"> </div>
<hr>
<div class="grid-13"><div class="grid-13"> </div>
<input type="submit" value="Save">
<a href="#" class="close">Cancel</a></div>
</form>
</div>
''')}}
<script type="text/javascript">
/*<![CDATA[*/
$('form').attr("action",$('#sidebar a.create_short_url').attr('href'));
/*]]>*/
</script>
{% endblock %}