source: OpenWorkouts-current/ow/templates/bulk_files.pt @ fcf0ef3

current
Last change on this file since fcf0ef3 was fcf0ef3, checked in by Borja Lopez <borja@…>, 3 years ago

(#77) Bulk workouts upload:

  • Added a new Folder-like object under the root object to store compressed files
  • Added a new Blob-like object to store those compressed files into the database
  • Added the needed view/template code to handle adding/uploading compressed files that may contain workout tracking files + a page to see them per-user
  • Property mode set to 100644
File size: 2.4 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xml:lang="en"
3      xmlns:tal="http://xml.zope.org/namespaces/tal"
4      xmlns:metal="http://xml.zope.org/namespaces/metal"
5      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6      i18n:domain="OpenWorkouts"
7      metal:use-macro="load: base.pt"
8      tal:attributes="lang request.locale_name">
9
10  <metal:head-title metal:fill-slot="head-title">
11    <tal:t i18n:translate="">Multiple file uploads</tal:t>
12  </metal:head-title>
13
14  <metal:title metal:fill-slot="title">
15    <tal:t i18n:translate="">Multiple file uploads</tal:t>
16  </metal:title>
17
18  <metal:content metal:fill-slot="content">
19
20    <div class="bulk-files ow-forms">
21      <a href="" class="back"
22         tal:attributes="href request.resource_url(context)"
23         i18n:translate="">Back</a>
24      <h2 i18n:translate="">Multiple file uploads</h2>
25
26      <tal:bulk_files tal:repeat="bulk_file bulk_files">
27        <div class="bulk-file">
28
29          <h3 tal:content="bulk_file.file_name"></h3>
30
31          <p>
32            <span i18n:translate="">Uploaded on</span>
33            <span tal:content="bulk_file.uploaded_in_timezone(context.timezone)"></span>
34          </p>
35
36          <p>
37            <tal:loaded tal:condition="bulk_file.loaded">
38              <span i18n:translate="">File loaded on></span>
39              <span tal:content="bulk_file.loaded_in_timezone(context.timezone)"></span>
40            </tal:loaded>
41            <tal:not_loaded tal:condition="not bulk_file.loaded">
42              <span i18n:translate="">This file has not been yet processed</span>
43            </tal:not_loaded>
44          </p>
45
46          <tal:workouts tal:condition="bulk_file.loaded and bulk_file.workout_ids">
47            <ul class="bulk-loaded-workouts">
48              <tal:workout tal:repeat="workout bulk_file.workouts">
49                <li>
50                  <span tal:content="workout.start_in_timezone(context.timezone)"></span>,
51                  <span tal:content="workout.sport"></span>,
52                  <span tal:content="workout.title"></span>
53                </li>
54              </tal:workout>
55            </ul>
56          </tal:workouts>
57
58          <tal:no_workouts tal:condition="bulk_file.loaded and not bulk_file.workout_ids">
59            <p><span i18n:translate>No workouts have been loaded from this file</span></p>
60          </tal:no_workouts>
61
62        </div>
63      </tal:bulk_files>
64
65    </div>
66
67  </metal:content>
68
69</html>
Note: See TracBrowser for help on using the repository browser.