polish detail pages (#1817)
This commit is contained in:
@@ -21,6 +21,7 @@ Perform EACH version specific task between your version and the new one, otherwi
|
|||||||
|
|
||||||
- **BC break**: interface method signature `HtmlToPdfConverter::convertToPdf` changed
|
- **BC break**: interface method signature `HtmlToPdfConverter::convertToPdf` changed
|
||||||
- **BC break**: the macros `badge` and `label` do not apply the `|trans` filter any more
|
- **BC break**: the macros `badge` and `label` do not apply the `|trans` filter any more
|
||||||
|
- **BC Break**: removed `getVisible()` (deprecated since 1.4) method on Customer, Project and Activity (use `isVisible()` instead, templates are still working)
|
||||||
|
|
||||||
## [1.9](https://github.com/kevinpapst/kimai2/releases/tag/1.9)
|
## [1.9](https://github.com/kevinpapst/kimai2/releases/tag/1.9)
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default class KimaiPaginatedBoxWidget {
|
|||||||
document.addEventListener(eventName, reloadPage);
|
document.addEventListener(eventName, reloadPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.widget.on('click', '.box-tools a', function (event) {
|
this.widget.on('click', '.box-tools ul.pagination a', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
self.loadPage(jQuery(event.currentTarget).attr('href'));
|
self.loadPage(jQuery(event.currentTarget).attr('href'));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
@import 'error-page';
|
@import 'error-page';
|
||||||
@import 'print';
|
@import 'print';
|
||||||
@import 'content';
|
@import 'content';
|
||||||
|
@import 'box';
|
||||||
@import 'content-header';
|
@import 'content-header';
|
||||||
@import 'toolbar';
|
@import 'toolbar';
|
||||||
@import 'sidebar';
|
@import 'sidebar';
|
||||||
|
|||||||
14
assets/sass/box.scss
Normal file
14
assets/sass/box.scss
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
.box {
|
||||||
|
/* used on detail pages for: customer, project and activity */
|
||||||
|
.box-body.no-padding div.comment {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-tools {
|
||||||
|
/* a button that is directly connected with a pagination element inside the box tools (eg. project list on customer detail page) */
|
||||||
|
.btn-pager {
|
||||||
|
float: left;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,10 +5,10 @@
|
|||||||
"build/runtime.664a9501.js",
|
"build/runtime.664a9501.js",
|
||||||
"build/0.f7fae2b9.js",
|
"build/0.f7fae2b9.js",
|
||||||
"build/1.c24a9c6f.js",
|
"build/1.c24a9c6f.js",
|
||||||
"build/app.6c4a170e.js"
|
"build/app.5238bb11.js"
|
||||||
],
|
],
|
||||||
"css": [
|
"css": [
|
||||||
"build/app.f587e075.css"
|
"build/app.287d7740.css"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"invoice": {
|
"invoice": {
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
"build/runtime.664a9501.js": "sha384-xNNrNinl64G3nCUrIskgSjU0mUXXCB9lj6XCSInBTwxSKXk8uTMafnLHtdWdIGtd",
|
"build/runtime.664a9501.js": "sha384-xNNrNinl64G3nCUrIskgSjU0mUXXCB9lj6XCSInBTwxSKXk8uTMafnLHtdWdIGtd",
|
||||||
"build/0.f7fae2b9.js": "sha384-DR5A41RIECdWBd6xODR0b1hvGqcEYUyn9vNPreqK9VOCQWTF6bgxB4RVmqlOKilT",
|
"build/0.f7fae2b9.js": "sha384-DR5A41RIECdWBd6xODR0b1hvGqcEYUyn9vNPreqK9VOCQWTF6bgxB4RVmqlOKilT",
|
||||||
"build/1.c24a9c6f.js": "sha384-JPoKdrVtBemSiVBoAnmSxLML7xXM9zYeuwOPYQv/kLzt/P4cmLY5r9gH8oaGRPFG",
|
"build/1.c24a9c6f.js": "sha384-JPoKdrVtBemSiVBoAnmSxLML7xXM9zYeuwOPYQv/kLzt/P4cmLY5r9gH8oaGRPFG",
|
||||||
"build/app.6c4a170e.js": "sha384-ufY9u+2gN4IWz+QdbXxvILeX77+QL466MoGB0dM8wfXx7rK8j6epLN6Kmfi9I618",
|
"build/app.5238bb11.js": "sha384-P8pmrHS0GMjRmJ8I+zuYTZJH9C4liZKJmgWYJQVqkqEp7MPQYCgJ1G9a8nd9WUxq",
|
||||||
"build/app.f587e075.css": "sha384-0mHNUhjotTlRm9f3UTcbnM7KOB9m7f6Gl8Afio8/sr+bv5DLXD8dxPAXkQ0JJB02",
|
"build/app.287d7740.css": "sha384-r7SOhIZSkqdb+XsvdoZwMfXsnxooiPRyIeUYd5j9cEFOFExI0JjJ5/z1AIaqVFcA",
|
||||||
"build/invoice.50473330.js": "sha384-2BXic5Sgorf2tXai6zSAN4wLY2dbg06L03/xMKW6itMcszvtnRArKzfBh6DNcF3f",
|
"build/invoice.50473330.js": "sha384-2BXic5Sgorf2tXai6zSAN4wLY2dbg06L03/xMKW6itMcszvtnRArKzfBh6DNcF3f",
|
||||||
"build/invoice.13d8ef4e.css": "sha384-B6RN/wZJToSBCZk2JeLokIqWEhbh+Eb9arYbt9dM+YoC2Z6PnCeTwTqSGyexWWJh",
|
"build/invoice.13d8ef4e.css": "sha384-B6RN/wZJToSBCZk2JeLokIqWEhbh+Eb9arYbt9dM+YoC2Z6PnCeTwTqSGyexWWJh",
|
||||||
"build/invoice-pdf.1db2b744.js": "sha384-bSdIeRCtEJiYYuc2reb0e5CpJ1Kbd1lQNEkElMTiq1SX0IINzdwJJYf6WnCcHrNC",
|
"build/invoice-pdf.1db2b744.js": "sha384-bSdIeRCtEJiYYuc2reb0e5CpJ1Kbd1lQNEkElMTiq1SX0IINzdwJJYf6WnCcHrNC",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"build/0.f7fae2b9.js": "build/0.f7fae2b9.js",
|
"build/0.f7fae2b9.js": "build/0.f7fae2b9.js",
|
||||||
"build/1.c24a9c6f.js": "build/1.c24a9c6f.js",
|
"build/1.c24a9c6f.js": "build/1.c24a9c6f.js",
|
||||||
"build/2.a47ad919.js": "build/2.a47ad919.js",
|
"build/2.a47ad919.js": "build/2.a47ad919.js",
|
||||||
"build/app.css": "build/app.f587e075.css",
|
"build/app.css": "build/app.287d7740.css",
|
||||||
"build/app.js": "build/app.6c4a170e.js",
|
"build/app.js": "build/app.5238bb11.js",
|
||||||
"build/calendar.css": "build/calendar.c8f3c1fd.css",
|
"build/calendar.css": "build/calendar.c8f3c1fd.css",
|
||||||
"build/calendar.js": "build/calendar.e07134af.js",
|
"build/calendar.js": "build/calendar.e07134af.js",
|
||||||
"build/chart.js": "build/chart.c9943f57.js",
|
"build/chart.js": "build/chart.c9943f57.js",
|
||||||
|
|||||||
@@ -141,14 +141,6 @@ class Activity implements EntityWithMetaFields
|
|||||||
return $this->visible;
|
return $this->visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 1.4
|
|
||||||
*/
|
|
||||||
public function getVisible(): bool
|
|
||||||
{
|
|
||||||
return $this->visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection|MetaTableTypeInterface[]
|
* @return Collection|MetaTableTypeInterface[]
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -240,14 +240,6 @@ class Customer implements EntityWithMetaFields
|
|||||||
return $this->visible;
|
return $this->visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 1.4
|
|
||||||
*/
|
|
||||||
public function getVisible(): bool
|
|
||||||
{
|
|
||||||
return $this->visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setCompany(?string $company): Customer
|
public function setCompany(?string $company): Customer
|
||||||
{
|
{
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
|
|||||||
@@ -192,14 +192,6 @@ class Project implements EntityWithMetaFields
|
|||||||
return $this->visible;
|
return $this->visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 1.4, use isVisible() instead
|
|
||||||
*/
|
|
||||||
public function getVisible(): bool
|
|
||||||
{
|
|
||||||
return $this->visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getOrderNumber(): ?string
|
public function getOrderNumber(): ?string
|
||||||
{
|
{
|
||||||
return $this->orderNumber;
|
return $this->orderNumber;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ final class IconExtension extends AbstractExtension
|
|||||||
'back' => 'fas fa-long-arrow-alt-left',
|
'back' => 'fas fa-long-arrow-alt-left',
|
||||||
'calendar' => 'far fa-calendar-alt',
|
'calendar' => 'far fa-calendar-alt',
|
||||||
'clock' => 'far fa-clock',
|
'clock' => 'far fa-clock',
|
||||||
|
'comment' => 'far fa-comment',
|
||||||
'configuration' => 'fas fa-cogs',
|
'configuration' => 'fas fa-cogs',
|
||||||
'copy' => 'far fa-copy',
|
'copy' => 'far fa-copy',
|
||||||
'create' => 'far fa-plus-square',
|
'create' => 'far fa-plus-square',
|
||||||
|
|||||||
@@ -22,12 +22,15 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_tools %}
|
{% block box_tools %}
|
||||||
{% if can_edit %}
|
{% if can_edit %}
|
||||||
<a class="modal-ajax-form open-edit btn btn-box-tool" data-href="{{ path('admin_activity_edit', {'id': activity.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_activity_edit', {'id': activity.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'action.edit'|trans }}"><i class="{{ 'edit'|icon }}"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
{% if activity.comment is not empty %}
|
{% if activity.comment is not empty %}
|
||||||
|
<div class="comment">
|
||||||
{{ activity.comment|comment2html(true) }}
|
{{ activity.comment|comment2html(true) }}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
{% if not activity.visible %}
|
{% if not activity.visible %}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||||
{% import "macros/widgets.html.twig" as widgets %}
|
|
||||||
{% import "activity/actions.html.twig" as actions %}
|
{% import "activity/actions.html.twig" as actions %}
|
||||||
|
|
||||||
{% block page_title %}{{ 'admin_activity.title'|trans }}{% endblock %}
|
{% block page_title %}{{ 'admin_activity.title'|trans }}{% endblock %}
|
||||||
@@ -39,6 +38,11 @@
|
|||||||
{% if form.metaFields is defined and form.metaFields is not empty %}
|
{% if form.metaFields is defined and form.metaFields is not empty %}
|
||||||
{{ form_row(form.metaFields) }}
|
{{ form_row(form.metaFields) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if form.create_more is defined and app.request.xmlHttpRequest %}
|
||||||
|
<div class="hidden">
|
||||||
|
{{ form_row(form.create_more) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{{ form_widget(form) }}
|
{{ form_widget(form) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
|
|||||||
@@ -17,12 +17,15 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_tools %}
|
{% block box_tools %}
|
||||||
{% if can_edit %}
|
{% if can_edit %}
|
||||||
<a class="modal-ajax-form open-edit btn btn-box-tool" data-href="{{ path('admin_customer_edit', {'id': customer.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_customer_edit', {'id': customer.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'action.edit'|trans }}"><i class="{{ 'edit'|icon }}"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
{% if customer.comment is not empty %}
|
{% if customer.comment is not empty %}
|
||||||
|
<div class="comment">
|
||||||
{{ customer.comment|comment2html(true) }}
|
{{ customer.comment|comment2html(true) }}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
{% if not customer.visible %}
|
{% if not customer.visible %}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||||
{% import "macros/widgets.html.twig" as widgets %}
|
|
||||||
{% import "customer/actions.html.twig" as actions %}
|
{% import "customer/actions.html.twig" as actions %}
|
||||||
|
|
||||||
{% block page_title %}{{ 'admin_customer.title'|trans }}{% endblock %}
|
{% block page_title %}{{ 'admin_customer.title'|trans }}{% endblock %}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
{% if projects|length > 0 %}
|
|
||||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'customer': customer, 'projects': projects, 'page': page} %}
|
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'customer': customer, 'projects': projects, 'page': page} %}
|
||||||
{% import "project/actions.html.twig" as actions %}
|
{% import "project/actions.html.twig" as actions %}
|
||||||
{% import "macros/widgets.html.twig" as widgets %}
|
{% import "macros/widgets.html.twig" as widgets %}
|
||||||
@@ -7,18 +6,34 @@
|
|||||||
id="project_list_box" data-href="{{ path('customer_projects', {'id': customer.id}) }}" data-reload="kimai.projectUpdate"
|
id="project_list_box" data-href="{{ path('customer_projects', {'id': customer.id}) }}" data-reload="kimai.projectUpdate"
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_tools %}
|
{% block box_tools %}
|
||||||
|
{% if customer.visible and is_granted('create_project') %}
|
||||||
|
<a class="modal-ajax-form open-edit btn btn-default btn-sm btn-pager" data-href="{{ path('admin_project_create_with_customer', {'customer': customer.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'create'|trans }}"><i class="{{ 'create'|icon }}"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if projects|length > 0 %}
|
||||||
{{ pagination(projects, { css_container_class: 'pagination pagination-sm inline', routeName: 'customer_projects', routeParams: {'id': customer.id} }) }}
|
{{ pagination(projects, { css_container_class: 'pagination pagination-sm inline', routeName: 'customer_projects', routeParams: {'id': customer.id} }) }}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_body_class %}no-padding{% endblock %}
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_tools_attributes %}data-page="{{ page }}"{% endblock %}
|
{% block box_tools_attributes %}data-page="{{ page }}"{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
|
{% if projects|length == 0 %}
|
||||||
|
<div class="comment">{{ 'error.no_entries_found'|trans }}</div>
|
||||||
|
{% else %}
|
||||||
<table class="table table-hover dataTable">
|
<table class="table table-hover dataTable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{ 'label.name'|trans }}</th>
|
||||||
|
<th class="hidden-xs">{{ 'label.comment'|trans }}</th>
|
||||||
|
<th class="w-min text-center">{{ 'label.team'|trans }}</th>
|
||||||
|
<th class="actions"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for project in projects %}
|
{% for project in projects %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ project.name }}</td>
|
<td>{{ widgets.label_project(project) }}</td>
|
||||||
<td>{{ project.comment|comment2html }}</td>
|
<td class="hidden-xs">{{ project.comment|comment2html }}</td>
|
||||||
<td>
|
<td class="w-min text-center">
|
||||||
{% if project.teams|length > 0 %}
|
{% if project.teams|length > 0 %}
|
||||||
{{ widgets.badge_counter(project.teams|length) }}
|
{{ widgets.badge_counter(project.teams|length) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -30,6 +45,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -38,4 +54,3 @@
|
|||||||
KimaiPaginatedBoxWidget.create('#project_list_box');
|
KimaiPaginatedBoxWidget.create('#project_list_box');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
{% if route_delete is not null %}
|
{% if route_delete is not null %}
|
||||||
<a href="{{ path(route_delete, {'id': comment.id}) }}" class="confirmation-link btn btn-default btn-xs" data-question="confirm.delete"><i class="{{ 'delete'|icon }}"></i></a>
|
<a href="{{ path(route_delete, {'id': comment.id}) }}" class="confirmation-link btn btn-default btn-xs" data-question="confirm.delete"><i class="{{ 'delete'|icon }}"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ comment.createdAt|date_full }}
|
<span class="hidden-xs">{{ comment.createdAt|date_full }}</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
{{ comment.message|replace(replacer)|md2html }}
|
{{ comment.message|replace(replacer)|md2html }}
|
||||||
@@ -40,11 +40,11 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
{{ widgets.user_avatar(app.user, false, 'img-responsive img-sm') }}
|
{{ widgets.user_avatar(app.user, false, 'img-responsive img-sm') }}
|
||||||
<div class="img-push">
|
<div class="img-push">
|
||||||
{{ form_widget(form.message) }}
|
{{ form_widget(form.message, {'attr': {'rows': '1', 'placeholder': 'placeholder.type_message'|trans}}) }}
|
||||||
</div>
|
</div>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="submit" class="btn btn-default">
|
<button type="submit" class="btn btn-default">
|
||||||
{{ 'action.save'|trans }}
|
<i class="{{ 'comment'|icon }}"></i>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,13 +5,14 @@
|
|||||||
{{ 'rates.title'|trans }}
|
{{ 'rates.title'|trans }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_tools %}
|
{% block box_tools %}
|
||||||
<a class="modal-ajax-form open-edit btn btn-box-tool" data-href="{{ create_url }}" data-toggle="tooltip" data-placement="top" title="{{ 'create'|trans }}"><i class="{{ 'create'|icon }}"></i></a>
|
<a class="modal-ajax-form open-edit btn btn-default btn-sm" data-href="{{ create_url }}" data-toggle="tooltip" data-placement="top" title="{{ 'create'|trans }}"><i class="{{ 'create'|icon }}"></i></a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
{% if rates is empty %}
|
{% if rates is empty %}
|
||||||
{{ 'rates.empty'|trans }}
|
<div class="comment">{{ 'rates.empty'|trans }}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<table class="table dataTable" >
|
<table class="table dataTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
|
|||||||
@@ -11,22 +11,23 @@
|
|||||||
{% import "macros/widgets.html.twig" as widgets %}
|
{% import "macros/widgets.html.twig" as widgets %}
|
||||||
{% block box_tools %}
|
{% block box_tools %}
|
||||||
{% if route_create is not null and (teams|length == 0 or team is null) and is_granted('create_team') %}
|
{% if route_create is not null and (teams|length == 0 or team is null) and is_granted('create_team') %}
|
||||||
<a class="btn-box-tool" href="{{ route_create }}" data-toggle="tooltip" data-placement="top" title="{{ 'team.create_default'|trans({}, 'teams') }}"><i class="{{ 'create'|icon }}"></i></a>
|
<a class="btn btn-default btn-sm" href="{{ route_create }}" data-toggle="tooltip" data-placement="top" title="{{ 'team.create_default'|trans({}, 'teams') }}"><i class="{{ 'create'|icon }}"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if route_edit is not null %}
|
{% if route_edit is not null %}
|
||||||
<a class="modal-ajax-form open-edit btn btn-box-tool" href="{{ route_edit }}" 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" href="{{ route_edit }}" data-toggle="tooltip" data-placement="top" title="{{ 'action.edit'|trans }}"><i class="{{ 'edit'|icon }}"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_attributes %}id="team_listing_box"{% endblock %}
|
{% block box_attributes %}id="team_listing_box"{% endblock %}
|
||||||
{% block box_title %}
|
{% block box_title %}
|
||||||
{{ 'permissions'|trans({}, 'actions') }}
|
{{ 'permissions'|trans({}, 'actions') }}
|
||||||
|
{% if teams|length > 0 %}<small class="hidden-xs">{{ 'team.visibility_restricted'|trans({}, 'teams') }}</small>{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
{% if teams|length > 0 %}
|
{% if teams|length > 0 %}
|
||||||
<p>{{ 'team.visibility_restricted'|trans({}, 'teams') }}</p>
|
|
||||||
{{ widgets.team_list(teams) }}
|
{{ widgets.team_list(teams) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ empty_message|default('team.visibility_global')|trans({}, 'teams') }}
|
<div class="comment">{{ empty_message|default('team.visibility_global')|trans({}, 'teams') }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
{% if is_granted('view_other_timesheet') %}
|
{% if is_granted('view_other_timesheet') %}
|
||||||
{% set actions = actions|merge({'timesheet': path('admin_timesheet', {'customers[]': project.customer.id, 'projects[]': project.id})}) %}
|
{% set actions = actions|merge({'timesheet': path('admin_timesheet', {'customers[]': project.customer.id, 'projects[]': project.id})}) %}
|
||||||
{% endif %}
|
{% 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})}) %}
|
{% set actions = actions|merge({'create-activity': path('admin_activity_create_with_project', {'project': project.id})}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if (view == 'index' or view == 'custom') and is_granted('delete', project) %}
|
{% 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_attributes %}id="project_details_box"{% endblock %}
|
||||||
{% block box_tools %}
|
{% block box_tools %}
|
||||||
{% if can_edit %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_title %}
|
{% block box_title %}
|
||||||
{{ widgets.label_project(project) }}
|
{{ widgets.label_project(project) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
{% if project.comment is not empty %}
|
{% if project.comment is not empty %}
|
||||||
|
<div class="comment">
|
||||||
{{ project.comment|comment2html(true) }}
|
{{ project.comment|comment2html(true) }}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
{% if not project.visible %}
|
{% if not project.visible %}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||||
{% import "macros/widgets.html.twig" as widgets %}
|
|
||||||
{% import "project/actions.html.twig" as actions %}
|
{% import "project/actions.html.twig" as actions %}
|
||||||
|
|
||||||
{% block page_title %}{{ 'admin_project.title'|trans }}{% endblock %}
|
{% block page_title %}{{ 'admin_project.title'|trans }}{% endblock %}
|
||||||
@@ -54,6 +53,11 @@
|
|||||||
{% if form.metaFields is defined and form.metaFields is not empty %}
|
{% if form.metaFields is defined and form.metaFields is not empty %}
|
||||||
{{ form_row(form.metaFields) }}
|
{{ form_row(form.metaFields) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if form.create_more is defined and app.request.xmlHttpRequest %}
|
||||||
|
<div class="hidden">
|
||||||
|
{{ form_row(form.create_more) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{{ form_widget(form) }}
|
{{ form_widget(form) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
|
|||||||
@@ -1,27 +1,43 @@
|
|||||||
{% if activities|length > 0 %}
|
|
||||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'project': project, 'activities': activities, 'page': page} %}
|
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'project': project, 'activities': activities, 'page': page} %}
|
||||||
{% import "activity/actions.html.twig" as actions %}
|
{% import "activity/actions.html.twig" as actions %}
|
||||||
|
{% import "macros/widgets.html.twig" as widgets %}
|
||||||
{% block box_title %}{{ 'menu.admin_activity'|trans }}{% endblock %}
|
{% block box_title %}{{ 'menu.admin_activity'|trans }}{% endblock %}
|
||||||
{% block box_attributes %}
|
{% block box_attributes %}
|
||||||
id="activity_list_box" data-href="{{ path('project_activities', {'id': project.id}) }}" data-reload="kimai.activityUpdate"
|
id="activity_list_box" data-href="{{ path('project_activities', {'id': project.id}) }}" data-reload="kimai.activityUpdate"
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_tools %}
|
{% block box_tools %}
|
||||||
|
{% 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} }) }}
|
{{ pagination(activities, { css_container_class: 'pagination pagination-sm inline', routeName: 'project_activities', routeParams: {'id': project.id} }) }}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block box_body_class %}no-padding{% endblock %}
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_tools_attributes %}data-page="{{ page }}"{% endblock %}
|
{% block box_tools_attributes %}data-page="{{ page }}"{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
|
{% if activities|length == 0 %}
|
||||||
|
<div class="comment">{{ 'error.no_entries_found'|trans }}</div>
|
||||||
|
{% else %}
|
||||||
<table class="table table-hover dataTable">
|
<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>
|
<tbody>
|
||||||
{% for activity in activities %}
|
{% for activity in activities %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ activity.name }}</td>
|
<td>{{ widgets.label_activity(activity) }}</td>
|
||||||
<td>{{ activity.comment|comment2html }}</td>
|
<td class="hidden-xs">{{ activity.comment|comment2html }}</td>
|
||||||
<td class="actions">{{ actions.activity(activity, 'custom') }}</td>
|
<td class="actions">{{ actions.activity(activity, 'custom') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -30,4 +46,3 @@
|
|||||||
KimaiPaginatedBoxWidget.create('#activity_list_box');
|
KimaiPaginatedBoxWidget.create('#activity_list_box');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
|
||||||
@@ -88,7 +88,7 @@ class CustomerControllerTest extends ControllerBaseTest
|
|||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
$node = $client->getCrawler()->filter('div.box#comments_box');
|
$node = $client->getCrawler()->filter('div.box#comments_box');
|
||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
$node = $client->getCrawler()->filter('div.box#team_listing_box a.btn-box-tool');
|
$node = $client->getCrawler()->filter('div.box#team_listing_box a.btn.btn-default');
|
||||||
self::assertEquals(2, $node->count());
|
self::assertEquals(2, $node->count());
|
||||||
$node = $client->getCrawler()->filter('div.box#customer_rates_box');
|
$node = $client->getCrawler()->filter('div.box#customer_rates_box');
|
||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
@@ -189,7 +189,7 @@ class CustomerControllerTest extends ControllerBaseTest
|
|||||||
$this->request($client, '/admin/customer/1/create_team');
|
$this->request($client, '/admin/customer/1/create_team');
|
||||||
$this->assertIsRedirect($client, $this->createUrl('/admin/customer/1/details'));
|
$this->assertIsRedirect($client, $this->createUrl('/admin/customer/1/details'));
|
||||||
$client->followRedirect();
|
$client->followRedirect();
|
||||||
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-body');
|
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-title');
|
||||||
self::assertStringContainsString('Only visible to the following teams and all admins.', $node->text(null, true));
|
self::assertStringContainsString('Only visible to the following teams and all admins.', $node->text(null, true));
|
||||||
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-body table tbody tr');
|
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-body table tbody tr');
|
||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class ProjectControllerTest extends ControllerBaseTest
|
|||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
$node = $client->getCrawler()->filter('div.box#comments_box');
|
$node = $client->getCrawler()->filter('div.box#comments_box');
|
||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
$node = $client->getCrawler()->filter('div.box#team_listing_box a.btn-box-tool');
|
$node = $client->getCrawler()->filter('div.box#team_listing_box a.btn.btn-default');
|
||||||
self::assertEquals(2, $node->count());
|
self::assertEquals(2, $node->count());
|
||||||
$node = $client->getCrawler()->filter('div.box#project_rates_box');
|
$node = $client->getCrawler()->filter('div.box#project_rates_box');
|
||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
@@ -257,7 +257,7 @@ class ProjectControllerTest extends ControllerBaseTest
|
|||||||
$this->request($client, '/admin/project/1/create_team');
|
$this->request($client, '/admin/project/1/create_team');
|
||||||
$this->assertIsRedirect($client, $this->createUrl('/admin/project/1/details'));
|
$this->assertIsRedirect($client, $this->createUrl('/admin/project/1/details'));
|
||||||
$client->followRedirect();
|
$client->followRedirect();
|
||||||
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-body');
|
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-title');
|
||||||
self::assertStringContainsString('Only visible to the following teams and all admins.', $node->text(null, true));
|
self::assertStringContainsString('Only visible to the following teams and all admins.', $node->text(null, true));
|
||||||
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-body table tbody tr');
|
$node = $client->getCrawler()->filter('div.box#team_listing_box .box-body table tbody tr');
|
||||||
self::assertEquals(1, $node->count());
|
self::assertEquals(1, $node->count());
|
||||||
@@ -267,7 +267,10 @@ class ProjectControllerTest extends ControllerBaseTest
|
|||||||
{
|
{
|
||||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
|
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
|
||||||
$this->assertAccessIsGranted($client, '/admin/project/1/activities/1');
|
$this->assertAccessIsGranted($client, '/admin/project/1/activities/1');
|
||||||
self::assertEquals('', $client->getResponse()->getContent());
|
$node = $client->getCrawler()->filter('div.box#activity_list_box .box-tools ul.pagination li');
|
||||||
|
self::assertEquals(0, $node->count());
|
||||||
|
$node = $client->getCrawler()->filter('div.box#activity_list_box .box-tools a.modal-ajax-form.open-edit');
|
||||||
|
self::assertEquals(1, $node->count());
|
||||||
|
|
||||||
/** @var EntityManager $em */
|
/** @var EntityManager $em */
|
||||||
$em = $this->getEntityManager();
|
$em = $this->getEntityManager();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class ActivityTest extends TestCase
|
|||||||
$this->assertNull($sut->getProject());
|
$this->assertNull($sut->getProject());
|
||||||
$this->assertNull($sut->getName());
|
$this->assertNull($sut->getName());
|
||||||
$this->assertNull($sut->getComment());
|
$this->assertNull($sut->getComment());
|
||||||
$this->assertTrue($sut->getVisible());
|
$this->assertTrue($sut->isVisible());
|
||||||
$this->assertTrue($sut->isGlobal());
|
$this->assertTrue($sut->isGlobal());
|
||||||
$this->assertNull($sut->getColor());
|
$this->assertNull($sut->getColor());
|
||||||
$this->assertEquals(0.0, $sut->getBudget());
|
$this->assertEquals(0.0, $sut->getBudget());
|
||||||
@@ -45,7 +45,7 @@ class ActivityTest extends TestCase
|
|||||||
$this->assertEquals('foo-bar', (string) $sut);
|
$this->assertEquals('foo-bar', (string) $sut);
|
||||||
|
|
||||||
$this->assertInstanceOf(Activity::class, $sut->setVisible(false));
|
$this->assertInstanceOf(Activity::class, $sut->setVisible(false));
|
||||||
$this->assertFalse($sut->getVisible());
|
$this->assertFalse($sut->isVisible());
|
||||||
|
|
||||||
$this->assertInstanceOf(Activity::class, $sut->setComment('hello world'));
|
$this->assertInstanceOf(Activity::class, $sut->setComment('hello world'));
|
||||||
$this->assertEquals('hello world', $sut->getComment());
|
$this->assertEquals('hello world', $sut->getComment());
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class CustomerTest extends TestCase
|
|||||||
self::assertNull($sut->getName());
|
self::assertNull($sut->getName());
|
||||||
self::assertNull($sut->getNumber());
|
self::assertNull($sut->getNumber());
|
||||||
self::assertNull($sut->getComment());
|
self::assertNull($sut->getComment());
|
||||||
self::assertTrue($sut->getVisible());
|
self::assertTrue($sut->isVisible());
|
||||||
|
|
||||||
self::assertNull($sut->getCompany());
|
self::assertNull($sut->getCompany());
|
||||||
self::assertNull($sut->getVatId());
|
self::assertNull($sut->getVatId());
|
||||||
@@ -61,7 +61,7 @@ class CustomerTest extends TestCase
|
|||||||
self::assertEquals('foo-bar', (string) $sut);
|
self::assertEquals('foo-bar', (string) $sut);
|
||||||
|
|
||||||
self::assertInstanceOf(Customer::class, $sut->setVisible(false));
|
self::assertInstanceOf(Customer::class, $sut->setVisible(false));
|
||||||
self::assertFalse($sut->getVisible());
|
self::assertFalse($sut->isVisible());
|
||||||
|
|
||||||
self::assertInstanceOf(Customer::class, $sut->setComment('hello world'));
|
self::assertInstanceOf(Customer::class, $sut->setComment('hello world'));
|
||||||
self::assertEquals('hello world', $sut->getComment());
|
self::assertEquals('hello world', $sut->getComment());
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ class ProjectTest extends TestCase
|
|||||||
self::assertNull($sut->getStart());
|
self::assertNull($sut->getStart());
|
||||||
self::assertNull($sut->getEnd());
|
self::assertNull($sut->getEnd());
|
||||||
self::assertNull($sut->getComment());
|
self::assertNull($sut->getComment());
|
||||||
self::assertTrue($sut->getVisible());
|
|
||||||
self::assertTrue($sut->isVisible());
|
self::assertTrue($sut->isVisible());
|
||||||
self::assertNull($sut->getColor());
|
self::assertNull($sut->getColor());
|
||||||
self::assertEquals(0.0, $sut->getBudget());
|
self::assertEquals(0.0, $sut->getBudget());
|
||||||
@@ -81,7 +80,7 @@ class ProjectTest extends TestCase
|
|||||||
self::assertEquals('#fffccc', $sut->getColor());
|
self::assertEquals('#fffccc', $sut->getColor());
|
||||||
|
|
||||||
self::assertInstanceOf(Project::class, $sut->setVisible(false));
|
self::assertInstanceOf(Project::class, $sut->setVisible(false));
|
||||||
self::assertFalse($sut->getVisible());
|
self::assertFalse($sut->isVisible());
|
||||||
|
|
||||||
self::assertInstanceOf(Project::class, $sut->setBudget(12345.67));
|
self::assertInstanceOf(Project::class, $sut->setBudget(12345.67));
|
||||||
self::assertEquals(12345.67, $sut->getBudget());
|
self::assertEquals(12345.67, $sut->getBudget());
|
||||||
|
|||||||
@@ -336,6 +336,10 @@
|
|||||||
<source>label.create_more</source>
|
<source>label.create_more</source>
|
||||||
<target>Weitere Einträge erstellen</target>
|
<target>Weitere Einträge erstellen</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="placeholder.type_message">
|
||||||
|
<source>placeholder.type_message</source>
|
||||||
|
<target>Schreibe Deine Nachricht...</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Buttons & Actions
|
Buttons & Actions
|
||||||
|
|||||||
@@ -336,6 +336,10 @@
|
|||||||
<source>label.create_more</source>
|
<source>label.create_more</source>
|
||||||
<target>Create further entries</target>
|
<target>Create further entries</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="placeholder.type_message">
|
||||||
|
<source>placeholder.type_message</source>
|
||||||
|
<target>Type your message...</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Buttons & Actions
|
Buttons & Actions
|
||||||
|
|||||||
Reference in New Issue
Block a user