Skip to content

Commit

Permalink
Update users list
Browse files Browse the repository at this point in the history
  • Loading branch information
mRoca committed May 9, 2020
1 parent d51af71 commit 272011e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 20 deletions.
7 changes: 4 additions & 3 deletions templates/organization/commissionable_asset/_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<table class="table table-stripped mt-3">
<thead class="thead-light">
<tr>
<th>{{ 'organization.label' | trans }}</th>
<th>{{ 'common.type' | trans }}</th>
<th>{{ 'organization.asset.identificationNumber' | trans }}</th>
{% if showLinks is not defined or showLinks %}
<th>{{ 'common.availabilities' | trans }}</th>
{% endif %}
<th>{{ 'organization.label' | trans }}</th>
{% if showLinks is not defined or showLinks %}
<th></th>
{% endif %}
Expand All @@ -16,6 +16,8 @@
<tbody>
{% for asset in assets %}
<tr>
<td>{{ asset.organization.name }}</td>

<td>{{ asset.assetType.name }}</td>
<td class="text-nowrap">
{{ asset.name }}
Expand All @@ -28,10 +30,9 @@
</td>
{% endif %}

<td>{{ asset.organization.name }}</td>
{% if showLinks is not defined or showLinks %}
<td>
<button class="btn btn-outline-primary" data-toggle="ajax-modal" data-href="{{ path('app_organization_asset_show_modal', { 'asset': asset.id, 'organization': asset.organization.id }) }}" title="{{ 'action.show' | trans }}">
<button class="btn btn-outline-primary text-nowrap" data-toggle="ajax-modal" data-href="{{ path('app_organization_asset_show_modal', { 'asset': asset.id, 'organization': asset.organization.id }) }}" title="{{ 'action.show' | trans }}">
<span class="fa fa-copy"></span> {{ 'action.show' | trans }}
</button>
</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/organization/mission/_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{% endif %}

{% if modalLinks is not defined or modalLinks %}
<button type="button" class="btn btn-outline-primary" data-toggle="ajax-modal" data-href="{{ path('app_organization_mission_modal', {id: mission.id}) }}">
<button type="button" class="btn btn-outline-primary text-nowrap" data-toggle="ajax-modal" data-href="{{ path('app_organization_mission_modal', {id: mission.id}) }}">
<span class="fa fa-copy"></span> {{ 'action.show' | trans }}
</button>
{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions templates/organization/mission/_list_full.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<td>
<span class="badge badge-secondary">{{ mission.type.name | default('') }}</span>

<button type="button" class="btn btn-link p-0" data-toggle="ajax-modal" data-href="{{ path('app_organization_mission_modal', {id: mission.id}) }}">
<button type="button" class="btn btn-link p-0 text-nowrap" data-toggle="ajax-modal" data-href="{{ path('app_organization_mission_modal', {id: mission.id}) }}">
<span class="fa fa-copy"></span> {{ mission.name }}
</button>
</td>
Expand All @@ -45,7 +45,7 @@
<td colspan="3"></td>
<td>{{ user.organization.name }}</td>
<td>
<button type="button" class="btn btn-link p-0" data-toggle="ajax-modal" data-href="{{ path('app_organization_user_show_modal', {userToShow: user.id, organization: user.organization.id}) }}">
<button type="button" class="btn btn-link p-0 text-nowrap" data-toggle="ajax-modal" data-href="{{ path('app_organization_user_show_modal', {userToShow: user.id, organization: user.organization.id}) }}">
<span class="fa fa-copy"></span> {{ user.fullName }}
</button>
</td>
Expand All @@ -66,7 +66,7 @@
<td colspan="3"></td>
<td>{{ asset.organization.name }}</td>
<td>
<button type="button" class="btn btn-link p-0" data-toggle="ajax-modal" data-href="{{ path('app_organization_asset_show_modal', {asset: asset.id, organization: asset.organization.id}) }}">
<button type="button" class="btn btn-link p-0 text-nowrap" data-toggle="ajax-modal" data-href="{{ path('app_organization_asset_show_modal', {asset: asset.id, organization: asset.organization.id}) }}">
<span class="fa fa-copy"></span> {{ asset }}
</button>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

{% block itemDataRowHeader %}
<button type="button" class="btn btn-link p-0" data-toggle="ajax-modal" data-href="{{ path('app_organization_asset_show_modal', {asset: item.entity.id, organization: item.entity.organization.id}) }}">
<span class="fa fa-copy"></span> {{ item.entity }}
{{ item.entity }}
</button>
{% endblock itemDataRowHeader %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

{% block itemDataRowHeader %}
<button type="button" class="btn btn-link p-0" data-toggle="ajax-modal" data-href="{{ path('app_organization_user_show_modal', {userToShow: item.entity.id, organization: item.entity.organization.id}) }}">
<span class="fa fa-copy"></span> {{ item.entity }}
{{ item.entity }}
</button>

{{ item.entity.skillSet | filterSkillsToDisplay | filterInludedSkills | map(skill => skill|skillBadge) | join | raw }}
Expand Down
32 changes: 21 additions & 11 deletions templates/organization/user/_list.html.twig
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<div class="table-responsive">
<table class="table table-striped mt-3">
<table class="table table-striped text-nowrap mt-3">
<thead class="thead-light">
<tr>
<th>{{ 'user.identificationNumber' | trans }}</th>
{% if organization.isParent %}
<th>{{ 'organization.label' | trans }}</th>
{% endif %}
<th>{{ 'user.firstName' | trans }}</th>
<th>{{ 'user.lastName' | trans }}</th>
<th>{{ 'organization.user.skillset' | trans }}</th>
<th>{{ 'user.email' | trans }}</th>
{% if organization.parent is null %}
<th>{{ 'organization.label' | trans }}</th>
<th>{{ 'user.skills' | trans }}</th>
<th>{{ 'user.identificationNumber' | trans }}</th>
{% if showLinks is not defined or showLinks %}
<th>{{ 'user.email' | trans }}</th>
{% endif %}
<th>{{ 'common.phoneNumberShort' | trans }}</th>
{% if showLinks is not defined or showLinks %}
<th></th>
{% endif %}
Expand All @@ -18,17 +21,24 @@
<tbody>
{% for user in users %}
<tr>
<td><small>{{ user.identificationNumber }}</small></td>
{% if organization.isParent %}
<td>{{ user.organization.name }}</td>
{% endif %}
<td>{{ user.firstName }}</td>
<td>{{ user.lastName }}</td>
<td>{{ user|userBadges }}</td>
<td><small>{{ user.emailAddress }}</small></td>
{% if organization.parent is null %}
<td>{{ user.organization.name }}</td>
<td><small>{{ user.identificationNumber }}</small></td>
{% if showLinks is not defined or showLinks %}
<td><small>{{ user.emailAddress }}</small></td>
{% endif %}
<td>
<a href="tel:{{ user.phoneNumber|phone_number_format('E164') }}" class="small">
{{ user.phoneNumber|phone_number_format('NATIONAL') }}
</a>
</td>
{% if showLinks is not defined or showLinks %}
<td>
<button class="btn btn-outline-primary" data-toggle="ajax-modal" data-href="{{ path('app_organization_user_show_modal', { 'userToShow': user.id, 'organization': user.organization.id }) }}">
<button class="btn btn-outline-primary text-nowrap" data-toggle="ajax-modal" data-href="{{ path('app_organization_user_show_modal', { 'userToShow': user.id, 'organization': user.organization.id }) }}">
<span class="fa fa-copy"></span> {{ 'action.show' | trans }}
</button>
</td>
Expand Down

0 comments on commit 272011e

Please sign in to comment.