aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/templates/es/existing.html4
-rw-r--r--www/templates/es/offline.html8
-rw-r--r--www/templates/es/photo.html64
-rw-r--r--www/templates/es/reports.html2
4 files changed, 45 insertions, 33 deletions
diff --git a/www/templates/es/existing.html b/www/templates/es/existing.html
index b45b3d8..baecd89 100644
--- a/www/templates/es/existing.html
+++ b/www/templates/es/existing.html
@@ -17,8 +17,8 @@
<p><% print( moment( created ).fromNow() ) %></p>
</div>
- <% if ( file ) { %>
- <div class="photo" style="background-image: url(<%= file %>)"></div>
+ <% if ( files.length > 0 ) { %>
+ <div class="photo" style="background-image: url(<%= files[0] %>)"></div>
<% } %>
<% if ( details ) { %>
diff --git a/www/templates/es/offline.html b/www/templates/es/offline.html
index 1051f57..4422408 100644
--- a/www/templates/es/offline.html
+++ b/www/templates/es/offline.html
@@ -46,7 +46,7 @@
</div>
</div>
- <% if ( file != '' ) { %>
+ <% if ( files.length > 0 ) { %>
<div id="add_photo" style="display: none">
<% } else { %>
<div id="add_photo">
@@ -56,16 +56,16 @@
<input data-icon="fms-photo-existing" value="Añadir una foto existente" type="button" name="existing" id="id_existing" data-role="button" data-theme="c">
</div>
- <% if ( file == '' ) { %>
+ <% if ( files.length == 0 ) { %>
<div id="display_photo" style="display: none">
<% } else { %>
<div id="display_photo">
<% } %>
<label>Su foto</label>
<div class="photo">
- <img class="small" id="photo" src="<%= file %>" />
+ <img class="small" id="photo" src="<%= files[0] %>" />
</div>
- <input value="Eliminar foto" type="button" name="del_photo_button" id="id_del_photo_button" data-role="button" data-theme="a">
+ <input value="Eliminar foto" type="button" name="del_photo_button" class="del_photo_button" data-role="button" data-theme="a">
</div>
</div>
</div>
diff --git a/www/templates/es/photo.html b/www/templates/es/photo.html
index 62f36dc..75de686 100644
--- a/www/templates/es/photo.html
+++ b/www/templates/es/photo.html
@@ -1,37 +1,49 @@
<div data-role="header">
<a data-rel="back" data-icon="arrow-l" class="ui-btn-left">Atrás</a>
- <h1>Añadir foto</h1>
- <% if ( file == '' ) { %>
- <a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Saltar</a>
+ <h1>Add Photos</h1>
+ <% if ( files.length == 0 ) { %>
+ <% if ( !CONFIG.PHOTO_REQUIRED ) { %>
+ <a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Saltar</a>
+ <% } %>
<% } else { %>
<a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Siguiente</a>
<% } %>
</div>
+
<div data-role="content">
- <% var photoClass = 'nodisplay', nophotoClass = 'nodisplay';
- if ( file != '' ) {
- photoClass = '';
- } else {
- nophotoClass = '';
- } %>
- <h2 id="nophoto_title" class="<% print( nophotoClass ); %>">
- Añadir una foto <em>(opcional)</em>
- </h2>
- <h2 id="photo_title" class="<% print( photoClass ); %>">
- Foto para el informe
- </h2>
- <div class="photo-wrapper">
- <div class="photo">
- <% if ( file == '' ) { %>
- <img class="placeholder" src="images/placeholder-photo.png" alt="" id="photo">
+ <% if ( files.length == 0 ) { %>
+ <h2 id="nophoto_title">
+ Añadir una foto
+ <% if ( !CONFIG.PHOTO_REQUIRED ) { %>
+ <em>(opcional)</em>
+ <% } else if ( files.length == 0) { %>
+ <em>(required)</em>
+ <%} %>
+ </h2>
<% } else { %>
- <img class="small" id="photo" src="<%= file %>" />
+ <h2 id="photo_title">
+ Photos for report
+ </h2>
<% } %>
- <a data-role="none" id="id_del_photo_button" class="photo-corner-button">X</a>
- </div>
- </div>
- <div class="bottom-btn">
- <input data-icon="fms-photo-existing" type="button" id="id_existing" data-theme="c" value="Añadir una foto existente" >
- <input data-icon="fms-photo-new" id="id_photo_button" type="button" data-theme="a" value="Tomar una nueva foto">
+
+ <div class="photo-wrapper">
+ <% if ( files.length == 0 ) { %>
+ <div class="photo">
+ <img class="placeholder" src="images/placeholder-photo.png" alt="">
+ </div>
+ <% } else { %>
+ <% _.each(files, function(file, index) { %>
+ <div class="photo" style="background-image: url('<%= file %>');">
+ <a data-role="none" class="photo-corner-button del_photo_button" data-file-index="<%= index %>">X</a>
+ </div>
+ <% });%>
+ <% } %>
</div>
+
+ <% if ( files.length < CONFIG.MAX_PHOTOS ) { %>
+ <div class="bottom-btn">
+ <input data-icon="fms-photo-existing" type="button" id="id_existing" data-theme="c" value="Añadir una foto existente" >
+ <input data-icon="fms-photo-new" id="id_photo_button" type="button" data-theme="a" value="Tomar una nueva foto">
+ </div>
+ <% } %>
</div>
diff --git a/www/templates/es/reports.html b/www/templates/es/reports.html
index cbd2acf..05772a5 100644
--- a/www/templates/es/reports.html
+++ b/www/templates/es/reports.html
@@ -15,7 +15,7 @@
if ( draft.get('lat') ) {
classes.push('with_location');
}
- if ( draft.get('file') ) {
+ if ( draft.get('files').length > 0 ) {
classes.push('with_photo');
}
var draftClass = '';