polish detail pages (#1817)
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
{% if is_granted('view_other_timesheet') %}
|
||||
{% set actions = actions|merge({'timesheet': path('admin_timesheet', {'customers[]': project.customer.id, 'projects[]': project.id})}) %}
|
||||
{% endif %}
|
||||
{% if is_granted('create_activity') and project.visible and project.customer.visible %}
|
||||
{% if project.visible and project.customer.visible and is_granted('create_activity') %}
|
||||
{% set actions = actions|merge({'create-activity': path('admin_activity_create_with_project', {'project': project.id})}) %}
|
||||
{% endif %}
|
||||
{% if (view == 'index' or view == 'custom') and is_granted('delete', project) %}
|
||||
|
||||
@@ -14,15 +14,18 @@
|
||||
{% block box_attributes %}id="project_details_box"{% endblock %}
|
||||
{% block box_tools %}
|
||||
{% if can_edit %}
|
||||
<a class="modal-ajax-form open-edit btn btn-box-tool" data-href="{{ path('admin_project_edit', {'id': project.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'action.edit'|trans }}"><i class="{{ 'edit'|icon }}"></i></a>
|
||||
<a class="modal-ajax-form open-edit btn btn-default btn-sm" data-href="{{ path('admin_project_edit', {'id': project.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'action.edit'|trans }}"><i class="{{ 'edit'|icon }}"></i></a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block box_title %}
|
||||
{{ widgets.label_project(project) }}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_body %}
|
||||
{% if project.comment is not empty %}
|
||||
{{ project.comment|comment2html(true) }}
|
||||
<div class="comment">
|
||||
{{ project.comment|comment2html(true) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<table class="table table-hover">
|
||||
{% if not project.visible %}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% import "project/actions.html.twig" as actions %}
|
||||
|
||||
{% block page_title %}{{ 'admin_project.title'|trans }}{% endblock %}
|
||||
@@ -54,6 +53,11 @@
|
||||
{% if form.metaFields is defined and form.metaFields is not empty %}
|
||||
{{ form_row(form.metaFields) }}
|
||||
{% endif %}
|
||||
{% if form.create_more is defined and app.request.xmlHttpRequest %}
|
||||
<div class="hidden">
|
||||
{{ form_row(form.create_more) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_widget(form) }}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
@@ -1,27 +1,43 @@
|
||||
{% if activities|length > 0 %}
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'project': project, 'activities': activities, 'page': page} %}
|
||||
{% import "activity/actions.html.twig" as actions %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_title %}{{ 'menu.admin_activity'|trans }}{% endblock %}
|
||||
{% block box_attributes %}
|
||||
id="activity_list_box" data-href="{{ path('project_activities', {'id': project.id}) }}" data-reload="kimai.activityUpdate"
|
||||
{% endblock %}
|
||||
{% block box_tools %}
|
||||
{{ pagination(activities, { css_container_class: 'pagination pagination-sm inline', routeName: 'project_activities', routeParams: {'id': project.id} }) }}
|
||||
{% if project.visible and project.customer.visible and is_granted('create_activity') %}
|
||||
<a class="modal-ajax-form open-edit btn btn-default btn-sm btn-pager" data-href="{{ path('admin_activity_create_with_project', {'project': project.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'create'|trans }}"><i class="{{ 'create'|icon }}"></i></a>
|
||||
{% endif %}
|
||||
{% if activities|length > 0 %}
|
||||
{{ pagination(activities, { css_container_class: 'pagination pagination-sm inline', routeName: 'project_activities', routeParams: {'id': project.id} }) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_tools_attributes %}data-page="{{ page }}"{% endblock %}
|
||||
{% block box_body %}
|
||||
<table class="table table-hover dataTable">
|
||||
<tbody>
|
||||
{% for activity in activities %}
|
||||
<tr>
|
||||
<td>{{ activity.name }}</td>
|
||||
<td>{{ activity.comment|comment2html }}</td>
|
||||
<td class="actions">{{ actions.activity(activity, 'custom') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if activities|length == 0 %}
|
||||
<div class="comment">{{ 'error.no_entries_found'|trans }}</div>
|
||||
{% else %}
|
||||
<table class="table table-hover dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'label.name'|trans }}</th>
|
||||
<th class="hidden-xs">{{ 'label.comment'|trans }}</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for activity in activities %}
|
||||
<tr>
|
||||
<td>{{ widgets.label_activity(activity) }}</td>
|
||||
<td class="hidden-xs">{{ activity.comment|comment2html }}</td>
|
||||
<td class="actions">{{ actions.activity(activity, 'custom') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
<script type="text/javascript">
|
||||
@@ -30,4 +46,3 @@
|
||||
KimaiPaginatedBoxWidget.create('#activity_list_box');
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user