Skip to content

Commit

Permalink
Added box shadow class for uniform look
Browse files Browse the repository at this point in the history
This reverts commit 2c55f49.
  • Loading branch information
codethejason committed Dec 27, 2015
1 parent d495384 commit 0529068
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 276 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,3 +13,4 @@ _mailinglist
.cache/
test.db
.idea/
.bundle/
239 changes: 121 additions & 118 deletions open_event/templates/admin/model/list.html
Expand Up @@ -13,144 +13,147 @@
<div class="col-md-2">
</div>
<div class="col-md-8">
{% block model_menu_bar %}
<ul class="nav nav-tabs actions-nav">
<li class="active">
<a href="javascript:void(0)">{{ _gettext('List') }} ({{ count }})</a>
</li>
{% if admin_view.can_create %}
<li>
<a href="{{ get_url('.create_view', url=return_url) }}" title="{{ _gettext('Create new record') }}">{{ _gettext('Create') }}</a>
</li>
{% endif %}
<div class="row well">
<h2>Event List</h2>
{% block model_menu_bar %}
<ul class="nav nav-tabs actions-nav">
<li class="active">
<a href="javascript:void(0)">{{ _gettext('List') }} ({{ count }})</a>
</li>
{% if admin_view.can_create %}
<li>
<a href="{{ get_url('.create_view', url=return_url) }}" title="{{ _gettext('Create new record') }}">{{ _gettext('Create') }}</a>
</li>
{% endif %}

{% if filters %}
<li class="dropdown">
{{ model_layout.filter_options() }}
</li>
{% endif %}
{% if filters %}
<li class="dropdown">
{{ model_layout.filter_options() }}
</li>
{% endif %}

{% if actions %}
<li class="dropdown">
{{ actionlib.dropdown(actions) }}
</li>
{% endif %}
{% if actions %}
<li class="dropdown">
{{ actionlib.dropdown(actions) }}
</li>
{% endif %}

{% if search_supported %}
<li>
{{ model_layout.search_form() }}
</li>
{% endif %}
</ul>
{% endblock %}
{% if search_supported %}
<li>
{{ model_layout.search_form() }}
</li>
{% endif %}
</ul>
{% endblock %}

{% if filters %}
{{ model_layout.filter_form() }}
<div class="clearfix"></div>
{% endif %}
{% if filters %}
{{ model_layout.filter_form() }}
<div class="clearfix"></div>
{% endif %}

{% block model_list_table %}
<table class="table table-striped table-bordered table-hover model-list">
<thead>
{% block model_list_table %}
<table class="table table-striped table-bordered table-hover model-list">
<thead>
<tr>
{% block list_header scoped %}
{% if actions %}
<th class="list-checkbox-column">
<input type="checkbox" name="rowtoggle" class="action-rowtoggle" title="{{ _gettext('Select all records') }}" />
</th>
{% endif %}
{% block list_row_actions_header %}
<th class="col-md-1">&nbsp;</th>
{% endblock %}
{% set column = 0 %}
{% for c, name in list_columns %}
<th class="column-header">
{% if admin_view.is_sortable(c) %}
{% if sort_column == column %}
<a href="{{ sort_url(column, True) }}" title="{{ _gettext('Sort by %(name)s', name=name) }}">
{{ name }}
{% if sort_desc %}
<span class="glyphicon glyphicon-chevron-up"></span>
{% else %}
<span class="glyphicon glyphicon-chevron-down"></span>
{% endif %}
</a>
{% else %}
<a href="{{ sort_url(column) }}" title="{{ _gettext('Sort by %(name)s', name=name) }}">{{ name }}</a>
{% endif %}
{% else %}
{{ name }}
{% endif %}
{% if admin_view.column_descriptions.get(c) %}
<a class="glyphicon glyphicon-question-sign"
title="{{ admin_view.column_descriptions[c] }}"
href="javascript:void(0)" data-role="tooltip"
></a>
{% endif %}
</th>
{% set column = column + 1 %}
{% endfor %}
{% endblock %}
</tr>
</thead>
{% for row in data %}
<tr>
{% block list_header scoped %}
{% block list_row scoped %}
{% if actions %}
<th class="list-checkbox-column">
<input type="checkbox" name="rowtoggle" class="action-rowtoggle" title="{{ _gettext('Select all records') }}" />
</th>
<td>
<input type="checkbox" name="rowid" class="action-checkbox" value="{{ get_pk_value(row) }}" title="{{ _gettext('Select record') }}" />
</td>
{% endif %}
{% block list_row_actions_header %}
<th class="col-md-1">&nbsp;</th>
{% block list_row_actions_column scoped %}
<td>
{% block list_row_actions scoped %}
{%- if admin_view.can_edit -%}
<a class="icon" href="{{ get_url('.edit_view', id=get_pk_value(row), url=return_url) }}" title="{{ _gettext('Edit record') }}">
<span class="glyphicon glyphicon-pencil"></span>
</a>
{%- endif -%}
{%- if admin_view.can_delete -%}
<form class="icon" method="POST" action="{{ get_url('.delete_view') }}">
{{ delete_form.id(value=get_pk_value(row)) }}
{{ delete_form.url(value=return_url) }}
{{ delete_form.csrf_token }}
<button onclick="return confirm('{{ _gettext('Are you sure you want to delete this record?') }}');" title="Delete record">
<span class="glyphicon glyphicon-trash"></span>
</button>
</form>
{%- endif -%}
{% endblock %}
</td>
{% endblock %}
{% set column = 0 %}
{% for c, name in list_columns %}
<th class="column-header">
{% if admin_view.is_sortable(c) %}
{% if sort_column == column %}
<a href="{{ sort_url(column, True) }}" title="{{ _gettext('Sort by %(name)s', name=name) }}">
{{ name }}
{% if sort_desc %}
<span class="glyphicon glyphicon-chevron-up"></span>
{% else %}
<span class="glyphicon glyphicon-chevron-down"></span>
{% endif %}
</a>
{% if admin_view.is_editable(c) %}
{% if form.csrf_token %}
<td>{{ form[c](pk=get_pk_value(row), value=get_value(row, c), csrf=form.csrf_token._value()) }}</td>
{% else %}
<a href="{{ sort_url(column) }}" title="{{ _gettext('Sort by %(name)s', name=name) }}">{{ name }}</a>
<td>{{ form[c](pk=get_pk_value(row), value=get_value(row, c)) }}</td>
{% endif %}
{% else %}
{{ name }}
{% endif %}
{% if admin_view.column_descriptions.get(c) %}
<a class="glyphicon glyphicon-question-sign"
title="{{ admin_view.column_descriptions[c] }}"
href="javascript:void(0)" data-role="tooltip"
></a>
<td>{{ get_value(row, c) }}</td>
{% endif %}
</th>
{% set column = column + 1 %}
{% endfor %}
{% endblock %}
</tr>
</thead>
{% for row in data %}
<tr>
{% block list_row scoped %}
{% if actions %}
<td>
<input type="checkbox" name="rowid" class="action-checkbox" value="{{ get_pk_value(row) }}" title="{{ _gettext('Select record') }}" />
</td>
{% endif %}
{% block list_row_actions_column scoped %}
<td>
{% block list_row_actions scoped %}
{%- if admin_view.can_edit -%}
<a class="icon" href="{{ get_url('.edit_view', id=get_pk_value(row), url=return_url) }}" title="{{ _gettext('Edit record') }}">
<span class="glyphicon glyphicon-pencil"></span>
</a>
{%- endif -%}
{%- if admin_view.can_delete -%}
<form class="icon" method="POST" action="{{ get_url('.delete_view') }}">
{{ delete_form.id(value=get_pk_value(row)) }}
{{ delete_form.url(value=return_url) }}
{{ delete_form.csrf_token }}
<button onclick="return confirm('{{ _gettext('Are you sure you want to delete this record?') }}');" title="Delete record">
<span class="glyphicon glyphicon-trash"></span>
</button>
</form>
{%- endif -%}
{% else %}
<tr>
<td colspan="999">
{% block empty_list_message %}
<div class="text-center">
{{ admin_view.get_empty_list_message() }}
</div>
{% endblock %}
</td>
{% endblock %}
{% for c, name in list_columns %}
{% if admin_view.is_editable(c) %}
{% if form.csrf_token %}
<td>{{ form[c](pk=get_pk_value(row), value=get_value(row, c), csrf=form.csrf_token._value()) }}</td>
{% else %}
<td>{{ form[c](pk=get_pk_value(row), value=get_value(row, c)) }}</td>
{% endif %}
{% else %}
<td>{{ get_value(row, c) }}</td>
{% endif %}
{% endfor %}
{% endblock %}
</tr>
{% else %}
<tr>
<td colspan="999">
{% block empty_list_message %}
<div class="text-center">
{{ admin_view.get_empty_list_message() }}
</div>
{% endblock %}
</td>
</tr>
{% endfor %}
</table>
{{ lib.pager(page, num_pages, pager_url) }}
{% endblock %}
</tr>
{% endfor %}
</table>
{{ lib.pager(page, num_pages, pager_url) }}
{% endblock %}

{{ actionlib.form(actions, get_url('.action_view')) }}
{{ actionlib.form(actions, get_url('.action_view')) }}
</div>
</div>
<div class="col-md-2"></div>
{% endblock %}
Expand Down
78 changes: 40 additions & 38 deletions open_event/templates/admin/model/microlocation/list.html
Expand Up @@ -3,48 +3,50 @@
{% block body %}
<div class="col-md-2"></div>
<div class="col-md-8">
<h2>Microlocation
<a href="{{ get_url('event.event_microlocation_new', event_id=event_id )}}" class="btn btn-primary" style="margin:5px">
Add New <i class="glyphicon glyphicon-plus" aria-hidden="true" style="margin-right:5px"></i>
</a>
</h2>
<div class="row well">
<h2>Microlocation
<a href="{{ get_url('event.event_microlocation_new', event_id=event_id )}}" class="btn btn-primary" style="margin:5px">
Add New <i class="glyphicon glyphicon-plus" aria-hidden="true" style="margin-right:5px"></i>
</a>
</h2>


<table class="table table-condensed" id="table-list">
<thead>
<tr>
<th style="width:20px!important"></th>
<th>Id</th>
<th>Name</th>
<th>Url</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Floor</th>
<th>Room</th>
</tr>
</thead>
<tbody>
{% for microlocation in objects %}
<table class="table table-condensed" id="table-list">
<thead>
<tr>
<td>
<a class="icon" href="{{ get_url('event.event_microlocation_edit', event_id=event_id, microlocation_id=microlocation.id )}}" title="Edit record">
<span class="glyphicon glyphicon-pencil"></span>
</a>
<a onclick="return confirm('Are you sure you want to delete this record?');" href="{{ get_url('event.event_microlocation_delete', event_id=event_id, microlocation_id=microlocation.id)}}" title="Delete record">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
<td>{{microlocation.id}}</td>
<td>{{microlocation.name}}</td>
<td>{{microlocation.url}}</td>
<td>{{microlocation.latitude}}</td>
<td>{{microlocation.longitude}}</td>
<td>{{microlocation.floor}}</td>
<td>{{microlocation.room}}</td>
<th style="width:20px!important"></th>
<th>Id</th>
<th>Name</th>
<th>Url</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Floor</th>
<th>Room</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for microlocation in objects %}
<tr>
<td>
<a class="icon" href="{{ get_url('event.event_microlocation_edit', event_id=event_id, microlocation_id=microlocation.id )}}" title="Edit record">
<span class="glyphicon glyphicon-pencil"></span>
</a>
<a onclick="return confirm('Are you sure you want to delete this record?');" href="{{ get_url('event.event_microlocation_delete', event_id=event_id, microlocation_id=microlocation.id)}}" title="Delete record">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
<td>{{microlocation.id}}</td>
<td>{{microlocation.name}}</td>
<td>{{microlocation.url}}</td>
<td>{{microlocation.latitude}}</td>
<td>{{microlocation.longitude}}</td>
<td>{{microlocation.floor}}</td>
<td>{{microlocation.room}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="col-md-2"></div>

Expand Down

0 comments on commit 0529068

Please sign in to comment.