Merge pull request #3242 from HRavalomanana/PHRAS-2829_Port41_Lightbox-mobile-users-choice-and-validation-report-b

PHRAS-2829 #comment merge Lightbox mobile : sort basket list + add user info
This commit is contained in:
Nicolas Maillat
2019-11-28 09:43:14 +01:00
committed by GitHub
6 changed files with 94 additions and 38 deletions

View File

@@ -108,3 +108,22 @@ a.active_choice{
.ui-footer .ui-title, .ui-header .ui-title {
font-size: 18px;
}
.ui-listview .ui-li-has-thumb .ui-li-thumb, .ui-listview .ui-li-has-thumb>.ui-btn>img:first-child, .ui-listview .ui-li-has-thumb>img:first-child {
top: 50%;
transform: translateY(-50%);
}
/*user status*/
.menu-bar-item {
background: #000;
padding: 12px;
text-align: center;
a {
color: #fff!important;
text-decoration: none!important;
font-weight: normal;
}
}

View File

@@ -0,0 +1,17 @@
{% set configuration = app['conf'].get(['registry', 'custom-links']) %}
{% if app.getAuthenticator().isAuthenticated() %}
<div class="menu-bar-item">
{% if app.getAuthenticatedUser().isGuest %}
<span class="icomoon icon-agree">&#xe957;</span>
<span>{{ 'Guest' | trans }}</span>
{% else %}
<a target="_blank" href="{{ path('account') }}"
title="{{ 'login:: Mon compte' | trans }}">
<span class="icomoon icon-agree">&#xe957;</span>
<span>{{ app.getAuthenticatedUser().getDisplayName() }}</span>
</a>
{% endif %}
</div>
{% endif %}

View File

@@ -26,7 +26,7 @@
#content {
position: fixed;
top:50px;
top:90px;
bottom: 0;
right: 0;
left: 0;
@@ -40,17 +40,19 @@
{% block content %}
{% set record = basket_element.getRecord(app) %}
<div data-role="page" id="page">
<div data-role="header">
<a href="{{ path('lightbox_validation', { 'basket' : basket_element.getBasket().getId() }) }}"
data-icon="arrow-l">{{ 'Back' | trans }}</a>
<h1>{{basket_element.getOrd()}} - {{record.get_title()}}</h1>
<a rel="external" href="{{ path('lightbox') }}" data-icon="home" data-iconpos="notext" data-direction="reverse"
class="ui-btn-right jqm-home">{{ 'Home' | trans }}</a>
</div>
<div id="content" data-role="content">
<div class="nav_button">
<div data-role="header">
<a href="{{ path('lightbox_validation', { 'basket' : basket_element.getBasket().getId() }) }}"
data-icon="arrow-l">{{ 'Back' | trans }}</a>
<h1>{{basket_element.getOrd()}} - {{record.get_title()}}</h1>
<a rel="external" href="{{ path('lightbox') }}" data-icon="home" data-iconpos="notext" data-direction="reverse"
class="ui-btn-right jqm-home">{{ 'Home' | trans }}</a>
</div>
<div class="lightbox-user-info">
{% include 'common/menubar.html.twig' %}
</div>
<div id="content" data-role="content">
<div class="nav_button">
{% if prevId != NULL %}
<a data-ajax="false" id="left-btn"
href="{{ path('lightbox_ajax_load_basketelement', { 'sselcont_id' : prevId }) }}"
@@ -62,31 +64,31 @@
class="ui-btn ui-shadow ui-corner-all ui-icon-carat-r ui-btn-icon-notext">Right</a>
{% endif %}
<div style="clear: both;"></div>
</div>
</div>
<div class="center-image">{{ thumbnail.format100percent(record.get_preview()) }}</div>
{% if basket_element.getBasket().getValidation() %}
{% if basket_element.getBasket().getValidation().getParticipant(app.getAuthenticatedUser()).getCanAgree() %}
<fieldset data-role="controlgroup" data-type="horizontal" style="text-align:center;">
<input onclick="window.location.reload();" {% if basket_element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() == true%}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-yes_{{basket_element.getId()}}" value="yes" />
<label class="agreement_radio" style="width:110px;text-align:center;"
for="radio-view-yes_{{ basket_element.getId() }}">{{ 'validation:: OUI' | trans }}</label>
<input onclick="window.location.reload();" {% if basket_element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() == false and basket_element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() is not null %}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-no_{{basket_element.getId()}}" value="no" />
<label class="agreement_radio" style="width:110px;text-align:center;"
for="radio-view-no_{{ basket_element.getId() }}">{{ 'validation:: NON' | trans }}</label>
</fieldset>
{% endif %}
<div style="text-align:center;margin:0 0 1em 0">
<a href="{{ path('lightbox_ajax_note_form', { 'sselcont_id' : basket_element.getId() }) }}" data-role="button" data-inline="true" data-rel="dialog" data-transition="slidedown">
{{ 'validation:: editer ma note' | trans }}
</a>
</div>
<div>
<ul data-role="listview" class="lightbox-list-view" id="notes_{{basket_element.getId()}}">
{% include 'lightbox/sc_note.html.twig' %}
</ul>
</div>
{% endif %}
</div>
{% if basket_element.getBasket().getValidation() %}
{% if basket_element.getBasket().getValidation().getParticipant(app.getAuthenticatedUser()).getCanAgree() %}
<fieldset data-role="controlgroup" data-type="horizontal" style="text-align:center;">
<input onclick="window.location.reload();" {% if basket_element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() == true%}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-yes_{{basket_element.getId()}}" value="yes" />
<label class="agreement_radio" style="width:110px;text-align:center;"
for="radio-view-yes_{{ basket_element.getId() }}">{{ 'validation:: OUI' | trans }}</label>
<input onclick="window.location.reload();" {% if basket_element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() == false and basket_element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() is not null %}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-no_{{basket_element.getId()}}" value="no" />
<label class="agreement_radio" style="width:110px;text-align:center;"
for="radio-view-no_{{ basket_element.getId() }}">{{ 'validation:: NON' | trans }}</label>
</fieldset>
{% endif %}
<div style="text-align:center;margin:0 0 1em 0">
<a href="{{ path('lightbox_ajax_note_form', { 'sselcont_id' : basket_element.getId() }) }}" data-role="button" data-inline="true" data-rel="dialog" data-transition="slidedown">
{{ 'validation:: editer ma note' | trans }}
</a>
</div>
<div>
<ul data-role="listview" class="lightbox-list-view" id="notes_{{basket_element.getId()}}">
{% include 'lightbox/sc_note.html.twig' %}
</ul>
</div>
{% endif %}
</div>
<div data-role="footer">
</div>

View File

@@ -17,7 +17,7 @@
#content {
position: fixed;
top:50px;
top:90px;
bottom: 0;
right: 0;
left: 0;
@@ -36,9 +36,12 @@
<h1>{{feed_element.getOrd()}} - {{record.get_title()}}</h1>
<a rel="external" href="{{ path('lightbox') }}" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
</div>
<div class="lightbox-user-info">
{% include 'common/menubar.html.twig' %}
</div>
<div id="content" data-role="content">
{{ thumbnail.format100percent(record.get_preview()) }}
</div>
<div data-role="footer">
</div>
{% endblock %}
{% endblock %}

View File

@@ -40,6 +40,9 @@
<h1>{{module_name}}</h1>
<a href="#about" class="ui-btn-right">{{ 'a propos' | trans }}</a>
</div>
<div class="lightbox-user-info">
{% include 'common/menubar.html.twig' %}
</div>
<div data-role="content">
<ul data-role="listview" style="width:100%;margin: 0;">
<li>
@@ -65,6 +68,9 @@
<a href="#home" data-rel="back" data-icon="arrow-l">{{ 'Back' | trans }}</a>
<h1>{{ 'a propos' | trans }}</h1>
</div>
<div class="lightbox-user-info">
{% include 'common/menubar.html.twig' %}
</div>
<div data-role="content">
<p>Phraseanet Version {{ app['phraseanet.version'].getName() }} - {{ app['phraseanet.version'].getNumber() }}</p>
<p>
@@ -85,12 +91,15 @@
<a rel="external" href="#home" data-icon="arrow-l">{{ 'Back' | trans }}</a>
<h1>{{ 'Validations' | trans }}</h1>
</div>
<div class="lightbox-user-info">
{% include 'common/menubar.html.twig' %}
</div>
<div data-role="content">
<p>
{{ 'Voici vos validations en cours' | trans }}
</p>
<ul data-role="listview" style="width:100%;margin: 0;">
{% for basket in baskets_collection %}
{% for basket in baskets_collection | sort | reverse%}
{% if basket.getValidation() %}
{% set basket_length = basket.getElements().count() %}
<li>
@@ -115,6 +124,9 @@
<a rel="external" href="#home" data-icon="arrow-l">{{ 'Back' | trans }}</a>
<h1>{{ 'Paniers' | trans }}</h1>
</div>
<div class="lightbox-user-info">
{% include 'common/menubar.html.twig' %}
</div>
<div data-role="content">
<p>
{{ 'Voici vos paniers' | trans }}

View File

@@ -32,6 +32,9 @@
<h1>{{basket.getName()}}</h1>
<a rel="external" href="{{ path('lightbox') }}" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">{{ 'Home' | trans }}</a>
</div>
<div class="lightbox-user-info">
{% include 'common/menubar.html.twig' %}
</div>
<div data-role="content">
<input type="hidden" id="basket_validation_id" value="{{ basket.getId() }}">
<p>