mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
all views created for person resource
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<div class="col-md col-xxl">
|
||||
|
||||
<h1>{{ 'Add a person resource'|trans }}</h1>
|
||||
|
||||
{{ form_start(form, {'attr' : {'id' : 'create-form'}}) }}
|
||||
|
||||
{{ form_row(form.kind) }}
|
||||
@@ -9,19 +7,19 @@
|
||||
<div id="linked-entity">
|
||||
<fieldset class="mb-3">
|
||||
<div class="row">
|
||||
<legend class="col-sm-4 col-form-label required">Associer un</legend>
|
||||
<legend class="col-sm-4 col-form-label">Associer un</legend>
|
||||
<div class="col-sm-8">
|
||||
<div id="chill_personbundle_person_resource_linkedEntity">
|
||||
<div class="form-check">
|
||||
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_0" class="form-check-input" value="person" />
|
||||
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_0" name="linked-entity" class="form-check-input" value="person" />
|
||||
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_0">Usager</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_1" class="form-check-input" value="thirdparty" />
|
||||
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_1" name="linked-entity" class="form-check-input" value="thirdparty" />
|
||||
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_1">Tiers</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_2" class="form-check-input" value="freeText" />
|
||||
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_2" name="linked-entity" class="form-check-input" value="freeText" />
|
||||
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_2">Description libre</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,14 +39,26 @@
|
||||
</div>
|
||||
|
||||
{{ form_row(form.comment) }}
|
||||
<ul class="record_actions">
|
||||
<li class="create">
|
||||
<button class="btn btn-create"
|
||||
type="submit" id="newPersonResource">
|
||||
{{ 'Add a person resource'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% if action is defined %}
|
||||
<ul class="record_actions">
|
||||
<li class="edit">
|
||||
<button class="btn btn-edit"
|
||||
type="submit" id="newPersonResource">
|
||||
{{ 'edit resource'|trans|capitalize }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<ul class="record_actions">
|
||||
<li class="create">
|
||||
<button class="btn btn-create"
|
||||
type="submit" id="newPersonResource">
|
||||
{{ 'Add a person resource'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
|
@@ -0,0 +1,17 @@
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_person_resource_list' %}
|
||||
{# {% set person = person %} #}
|
||||
|
||||
{% block title 'Remove resource'|trans %}
|
||||
|
||||
{% block personcontent %}
|
||||
{{ include('@ChillMain/Util/confirmation_template.html.twig',
|
||||
{
|
||||
'title' : 'Remove resource'|trans,
|
||||
'confirm_question' : 'Are you sure you want to remove the resource for "%name%" ?'|trans({ '%name%' : person.firstname ~ ' ' ~ person.lastname } ),
|
||||
'cancel_route' : 'chill_person_resource_list',
|
||||
'cancel_parameters' : { 'person_id' : person.id },
|
||||
'form' : form
|
||||
} ) }}
|
||||
{% endblock %}
|
@@ -0,0 +1,17 @@
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_person_resource_edit' %}
|
||||
|
||||
{% block title %}{{ 'edit resource'|trans|capitalize }}{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
<h1 style="margin-bottom: 2rem;">{{ 'edit resource'|trans }}</h1>
|
||||
|
||||
{% include "@ChillPerson/PersonResource/create.html.twig" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('page_person_resource') }}
|
||||
{% endblock %}
|
@@ -6,33 +6,69 @@
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">Name of resource</div>
|
||||
<div class="item-col">kind of resource</div>
|
||||
<h1>{{ 'List of resources'|trans }}</h1>
|
||||
|
||||
{% if personResources is not null %}
|
||||
{% for resource in personResources %}
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="wrap-header">
|
||||
<div class="wh-row">
|
||||
<div class="wh-col">
|
||||
{% if resource.person is not null %}
|
||||
<div class="item-col"><p class="h3">{{ resource.person }}</p></div>
|
||||
{% elseif resource.thirdparty is not null %}
|
||||
<div class="item-col"><p class="h3">{{ resource.thirdparty }}</p></div>
|
||||
{% else %}
|
||||
<div class="item-col"><p class="h3">{{ resource.freetext }}</p></div>
|
||||
{% endif %}
|
||||
<div class="wh-col">
|
||||
<span>{{ resource.kind.title.fr }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row separator">
|
||||
<section class="chill-entity entity-comment-embeddable">
|
||||
<blockquote class="chill-user-quote">
|
||||
<div>{{ resource.comment.comment }}<div>
|
||||
</blockquote>
|
||||
</section>
|
||||
</div>
|
||||
<div class="item-row separator">
|
||||
<div class="item-col">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_resource_edit', {'resource_id': resource.id,
|
||||
'person_id': person.id,}) }}"
|
||||
class="btn btn-sm btn-edit"
|
||||
title="{{ 'Edit'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_resource_delete', {'person_id': person.id,
|
||||
'resource_id': resource.id}) }}"
|
||||
class="btn btn-sm btn-delete"
|
||||
title="{{ 'Delete'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# <div class="item-row separator">
|
||||
<div class="item-col">How</div>
|
||||
<div class="item-col">are</div>
|
||||
</div> #}
|
||||
</div>
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">comment zone</div>
|
||||
<div class="item-col">....</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
{# <div class="item-col">today</div> #}
|
||||
<div class="item-col">Buttons</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
<p>{{ 'There are no available resources'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
<h1 style="margin-bottom: 2rem;">{{ 'Add a person resource'|trans }}</h1>
|
||||
|
||||
{% include "@ChillPerson/PersonResource/create.html.twig" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{# {{ encore_entry_script_tags('page_person_resource') }} #}
|
||||
{{ encore_entry_script_tags('page_person_resource') }}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user