Fix #993 Add send basket validation report in mobile view

This commit is contained in:
Nicolas Le Goff
2013-06-18 17:02:15 +02:00
parent f8c09c4e1c
commit 09a4fb52e0
3 changed files with 64 additions and 12 deletions

View File

@@ -5,12 +5,12 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>{{ app['phraseanet.registry'].get('GV_homeTitle') }} - {{ module_name }} </title>
<link rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.mobile-1.0a4/jquery.mobile-1.0a4.min.css' }) }}" />
<link rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.mobile-1.2.1/jquery.mobile-1.2.1.css' }) }}" />
<script src="{{ path('minifier', { 'f' : 'assets/jquery/jquery.js' }) }}"></script>
<script src="{{ path('minifier', { 'f' : 'nclude/jslibs/jquery.mobile-1.2.1/jquery.mobile-1.2.1.js' }) }}"></script>
{% block stylesheet %}{% endblock %}
{% block icon %}{% endblock %}
{% block javascript %}{% endblock %}
<script src="{{ path('minifier', { 'f' : 'include/jslibs/jquery.mobile-1.0a4/jquery.mobile-1.0a4.js' }) }}"></script>
</head>
<body>
{% block content %}{% endblock %}

View File

@@ -2,6 +2,11 @@
{% extends "common/index.html.twig" %}
{% block javascript %}
<script type="text/javascript">
{% if basket.getValidation() %}
var releasable = {% if basket.getValidation().getParticipant(app['authentication'].getUser(), app).isReleasable() %}"{% trans 'Do you want to send your report ?' %}"{% else %}false{% endif %}
{% endif %}
</script>
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'skins/lightbox/jquery.validator.mobile.js' }) }}"></script>
{% endblock %}
@@ -17,6 +22,7 @@
<a rel="external" href="{{ path('lightbox') }}" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">{% trans 'Home' %}</a>
</div>
<div data-role="content">
<input type="hidden" id="basket_validation_id" value="{{ basket.getId() }}">
<p>
{% set basket_length = basket.getElements().count() %}
{% trans %}{{basket_length}} documents{% endtrans %}
@@ -37,7 +43,12 @@
</ul>
</div>
<div data-role="footer">
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
<button class="confirm_report" style="width:100%;" title="{% trans 'validation::envoyer mon rapport'%}">
{% trans 'validation::envoyer mon rapport'%}
<img src="/skins/icons/loader1F1E1B.gif" style="visibility:hidden;" class="loader"/>
</button>
{% endif %}
</div>
</div>
{% endblock %}