mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
some small style improvements in thirdparty section
This commit is contained in:
parent
ce171ec747
commit
0617014e91
@ -1,5 +1,5 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="chill_filter_order container">
|
||||
<div class="chill_filter_order container my-4">
|
||||
<div class="row">
|
||||
{% if form.vars.has_search_box %}
|
||||
<div class="col-md-12">
|
||||
|
@ -19,13 +19,13 @@
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
|
||||
<span class="badge bg-thirdparty-child" v-if="item.result.kind == 'child'">
|
||||
<span class="badge rounded-pill bg-thirdparty-child" v-if="item.result.kind == 'child'">
|
||||
{{ $t('thirdparty.child')}}
|
||||
</span>
|
||||
<span class="badge bg-thirdparty-company" v-else-if="item.result.kind == 'company'">
|
||||
<span class="badge rounded-pill bg-thirdparty-company" v-else-if="item.result.kind == 'company'">
|
||||
{{ $t('thirdparty.company')}}
|
||||
</span>
|
||||
<span class="badge bg-thirdparty-contact" v-else="item.result.kind == 'contact'">
|
||||
<span class="badge rounded-pill bg-thirdparty-contact" v-else="item.result.kind == 'contact'">
|
||||
{{ $t('thirdparty.contact')}}
|
||||
</span>
|
||||
|
||||
|
@ -10,7 +10,20 @@
|
||||
background-color: $chill-blue;
|
||||
}
|
||||
&.bg-thirdparty-contact {
|
||||
//@extedn .bg-secondary;
|
||||
//@extend .bg-secondary;
|
||||
background-color: $secondary;
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
div.thirdparty-list {
|
||||
div.flex-table {
|
||||
div.item-bloc {
|
||||
div.item-row {
|
||||
div.item-col:first-child {
|
||||
flex-basis: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,13 +12,13 @@
|
||||
</a>
|
||||
<span class="name">{{ thirdparty.text }}</span>
|
||||
|
||||
<span class="badge bg-thirdparty-child" v-if="thirdparty.kind == 'child'">
|
||||
<span class="badge rounded-pill bg-thirdparty-child" v-if="thirdparty.kind == 'child'">
|
||||
{{ $t('thirdparty.child')}}
|
||||
</span>
|
||||
<span class="badge bg-thirdparty-company" v-else-if="thirdparty.kind == 'company'">
|
||||
<span class="badge rounded-pill bg-thirdparty-company" v-else-if="thirdparty.kind == 'company'">
|
||||
{{ $t('thirdparty.company')}}
|
||||
</span>
|
||||
<span class="badge bg-thirdparty-contact" v-else>
|
||||
<span class="badge rounded-pill bg-thirdparty-contact" v-else>
|
||||
{{ $t('thirdparty.contact')}}
|
||||
</span>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-0" type="radio" v-model="kind" value="company" id="tpartyKindInstitution">
|
||||
<label for="tpartyKindInstitution" class="required">
|
||||
<span class="badge bg-thirdparty-company" style="padding-top: 0;">
|
||||
<span class="badge rounded-pill bg-thirdparty-company" style="padding-top: 0;">
|
||||
{{ $t('tparty.company')}}
|
||||
</span>
|
||||
</label>
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-0" type="radio" v-model="kind" value="contact" id="tpartyKindContact">
|
||||
<label for="tpartyKindContact" class="required">
|
||||
<span class="badge bg-thirdparty-contact" style="padding-top: 0;">
|
||||
<span class="badge rounded-pill bg-thirdparty-contact" style="padding-top: 0;">
|
||||
{{ $t('tparty.contact')}}
|
||||
</span>
|
||||
</label>
|
||||
|
@ -82,7 +82,9 @@
|
||||
<div class="item-row entity-bloc">
|
||||
<div class="item-col">
|
||||
{{ _self.label(thirdparty, options) }}
|
||||
<span class="badge bg-thirdparty-{{ thirdparty.kind }}">{{ ('thirdparty.' ~ thirdparty.kind)|trans }}</span>
|
||||
{% if thirdparty.kind %}
|
||||
<span class="badge rounded-pill bg-thirdparty-{{ thirdparty.kind }}">{{ ('thirdparty.' ~ thirdparty.kind)|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="item-col">
|
||||
{% if options['isConfidential'] %}
|
||||
|
@ -6,6 +6,26 @@
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
|
||||
{% macro rowCustomButtons(tp) %}
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_edit',
|
||||
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}"
|
||||
title="{{ 'Edit'|trans }}"
|
||||
class="btn btn-sm btn-update"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_view',
|
||||
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}"
|
||||
title="{{ 'Show'|trans }}"
|
||||
class="btn btn-sm btn-show"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block index_header %}
|
||||
<h1>{{ 'List of third parties'|trans }}</h1>
|
||||
{% endblock %}
|
||||
@ -13,37 +33,25 @@
|
||||
{% block table_entities %}
|
||||
<div class="thirdparty-list my-5">
|
||||
<div class="row justify-content-center">
|
||||
<div>
|
||||
|
||||
<label class="counter">
|
||||
<label class="counter text-end">
|
||||
<span>{{ paginator.totalItems }}</span> {{ 'third parties'|trans }}
|
||||
</label>
|
||||
|
||||
<div class="flex-table">
|
||||
{% for tp in third_parties %}
|
||||
<div class="item-bloc">
|
||||
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true, 'isConfidential': (tp.contactDataAnonymous ? true : false) }) }}
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_edit',
|
||||
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}" class="btn btn-sm btn-update"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_view',
|
||||
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}" class="btn btn-sm btn-show"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{{ tp|chill_entity_render_box({
|
||||
'render': 'bloc',
|
||||
'showContacts': true,
|
||||
'addLink': true,
|
||||
'customButtons': { 'replace': _self.rowCustomButtons(tp) },
|
||||
'isConfidential': (tp.contactDataAnonymous ? true : false)
|
||||
}) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -12,7 +12,7 @@
|
||||
{% block crud_content_header %}
|
||||
<h1>
|
||||
{{ title_ }}
|
||||
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }}"
|
||||
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }} float-end"
|
||||
title="{{ (thirdParty.active ? 'shown to users' : 'not shown to users')|trans }}">
|
||||
{{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}
|
||||
</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user