Update entry routes for user and worklog templates to use 'user_item' and 'worklog_item' respectively
This commit is contained in:
parent
e0129e8246
commit
cc7cef6145
4 changed files with 6 additions and 6 deletions
|
|
@ -78,7 +78,7 @@ user_headers = {
|
||||||
"Last Name": lambda i: {"field": "last_name","text": i.last_name},
|
"Last Name": lambda i: {"field": "last_name","text": i.last_name},
|
||||||
"First Name": lambda i: {"field": "first_name","text": i.first_name},
|
"First Name": lambda i: {"field": "first_name","text": i.first_name},
|
||||||
"Title": lambda i: {"field": "title","text": i.title},
|
"Title": lambda i: {"field": "title","text": i.title},
|
||||||
"Supervisor": lambda i: {"field": "supervisor,identifier","text": i.supervisor.identifier, "url": url_for("main.user", id=i.supervisor.id)} if i.supervisor else {"text": None},
|
"Supervisor": lambda i: {"field": "supervisor,identifier","text": i.supervisor.identifier, "url": url_for("main.user_item", id=i.supervisor.id)} if i.supervisor else {"text": None},
|
||||||
"Location": lambda i: {"field": "location,identifier","text": i.location.identifier} if i.location else {"text": None},
|
"Location": lambda i: {"field": "location,identifier","text": i.location.identifier} if i.location else {"text": None},
|
||||||
"Staff?": lambda i: {"field": "staff","text": i.staff, "type": "bool", "html": checked_box if i.staff else unchecked_box},
|
"Staff?": lambda i: {"field": "staff","text": i.staff, "type": "bool", "html": checked_box if i.staff else unchecked_box},
|
||||||
"Active?": lambda i: {"field": "active","text": i.active, "type": "bool", "html": checked_box if i.active else unchecked_box}
|
"Active?": lambda i: {"field": "active","text": i.active, "type": "bool", "html": checked_box if i.active else unchecked_box}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
headers = active_worklog_headers,
|
headers = active_worklog_headers,
|
||||||
rows = active_worklog_rows,
|
rows = active_worklog_rows,
|
||||||
id = 'Active Worklog',
|
id = 'Active Worklog',
|
||||||
entry_route = 'worklog_entry',
|
entry_route = 'worklog_item',
|
||||||
per_page = 10
|
per_page = 10
|
||||||
)}}
|
)}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
{{ tables.render_table(
|
{{ tables.render_table(
|
||||||
headers = results['users']['headers'],
|
headers = results['users']['headers'],
|
||||||
rows = results['users']['rows'],
|
rows = results['users']['rows'],
|
||||||
entry_route = 'user',
|
entry_route = 'user_item',
|
||||||
title='User Results',
|
title='User Results',
|
||||||
id='search-users'
|
id='search-users'
|
||||||
)}}
|
)}}
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
{{ tables.render_table(
|
{{ tables.render_table(
|
||||||
headers = results['worklog']['headers'],
|
headers = results['worklog']['headers'],
|
||||||
rows = results['worklog']['rows'],
|
rows = results['worklog']['rows'],
|
||||||
entry_route = 'worklog_entry',
|
entry_route = 'worklog_item',
|
||||||
title='Worklog Results',
|
title='Worklog Results',
|
||||||
id='search-worklog'
|
id='search-worklog'
|
||||||
)}}
|
)}}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="card border border-primary border-2" style="width: 15rem;">
|
<div class="card border border-primary border-2" style="width: 15rem;">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title text-center">
|
<h5 class="card-title text-center">
|
||||||
{{ layer.user.first_name }} {{ layer.user.last_name }}<br />{{ links.entry_link('user', layer.user.id) }}
|
{{ layer.user.first_name }} {{ layer.user.last_name }}<br />{{ links.entry_link('user_item', layer.user.id) }}
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-text text-center">
|
<div class="card-text text-center">
|
||||||
{% if layer.user.title %}
|
{% if layer.user.title %}
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
{% if subordinate.title %}
|
{% if subordinate.title %}
|
||||||
({{ subordinate.title }})<br />
|
({{ subordinate.title }})<br />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ links.entry_link('user', subordinate.id) }}
|
{{ links.entry_link('user_item', subordinate.id) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue