myfiles.html.ep 6.05 KB
Newer Older
1
% # vim:set sts=4 sw=4 ts=4 ft=html.epl expandtab:
2
3
4
5
6
% my %d = (
%   delay_0   => l('no time limit'),
%   delay_1   => l('24 hours'),
%   delay_365 => l('1 year')
% );
7
8
9
10
<h4><%= l('My images') %></h4>
<hr>

<p>
11
    <%= l('Only the images sent with this browser will be listed here. The details are stored in localStorage: if you delete your localStorage data, you\'ll loose these details.') %>
12
</p>
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<div class="modal fade" id="modModal" tabindex="-1" role="dialog" aria-labelledby="modModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h1 id="mod-name" class="ellips"></h1>
            </div>
            <div class="modal-body">
                <div class="form-group form-inline">
                    <select id="mod-delete-day" name="delete-day" class="form-control">
% my @delays = split(',', $self->config('proposed_delays'));
% for my $delay (@delays) {
%   my $text = (defined($d{'delay_'.$delay})) ? $d{'delay_'.$delay} : l('%1 days', $delay);
%   if (config('max_delay')) {
%       if ($delay) {
%           if ($delay < config('max_delay')) {
                                <option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
%           } elsif ($delay == config('max_delay')) {
                                <option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
%               last;
%           } else {
%               my $text = ($delay == 1) ? l('24 hours') : l('%1 days', $delay);
                                <option value="<%= config('max_delay') %>" <%== is_selected(config('max_delay')) %>><%= l('%1 days', config('max_delay')) %></option>
%               last;
%           }
%       }
%   } else {
                                <option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
%   }
% }
                    </select>&nbsp;
                    <div class="checkbox">
                        <label>
                            <input id="mod-first-view" type="checkbox" name="first-view"> <%= l('Delete at first view?') %>
                        </label>
                    </div>&nbsp;
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><%= l('Close') %></button>
                <button type="button" class="btn btn-primary" id="mod-delay"><%= l('Save changes') %></button>
            </div>
        </div>
    </div>
</div>
57
58
59
60
61
<div id="gallery-url" class="hidden row">
    <form class="form col-sm-12">
        <div class="form-group">
            <label for="gallery-url-input"><%= l('Gallery link') %></label>
            <div class="input-group">
62
63
64
                <a class="input-group-addon" id="gallery-url-link" href="#" target="_blank" title="<%= l('Gallery link') %>">
                    <span class="icon icon-picture"></span>
                </a>
65
                <input class="form-control" name="gallery-url-input" type="text" id="gallery-url-input" readonly></input>
Luc Didry's avatar
Luc Didry committed
66
                <a href="#" class="input-group-addon jsonly copy-to-clipboard-link" title="<%= l('Copy to clipboard') %>">
67
68
69
70
71
72
73
74
75
76
77
                    <span class="icon icon-clipboard"></span>
                </a>
            </div>
        </div>
    </form>
</div>
<div id="zip-url" class="hidden row">
    <form class="form col-sm-12">
        <div class="form-group">
            <label for="zip-url-input"><%= l('Download zip link') %></label>
            <div class="input-group">
78
79
80
                <a class="input-group-addon" id="zip-url-link" href="#" target="_blank" title="<%= l('Download zip link') %>">
                    <span class="icon icon-file-archive"></span>
                </a>
81
                <input class="form-control" name="zip-url-input" type="text" id="zip-url-input" readonly></input>
Luc Didry's avatar
Luc Didry committed
82
                <a href="#" class="input-group-addon jsonly copy-to-clipboard-link" title="<%= l('Copy to clipboard') %>">
83
84
85
86
87
88
                    <span class="icon icon-clipboard"></span>
                </a>
            </div>
        </div>
    </form>
</div>
89
90
91
92
93
<div id="random-url" class="hidden row">
    <form class="form col-sm-12">
        <div class="form-group">
            <label for="random-url-input"><%= l('Random image link') %></label>
            <div class="input-group">
94
95
96
                <a class="input-group-addon" id="random-url-link" href="#" target="_blank" title="<%= l('Random image link') %>">
                    <span class="icon icon-shuffle"></span>
                </a>
97
98
99
100
101
102
103
104
                <input class="form-control" name="random-url-input" type="text" id="random-url-input" readonly></input>
                <a href="#" class="input-group-addon jsonly copy-to-clipboard-link" title="<%= l('Copy to clipboard') %>">
                    <span class="icon icon-clipboard"></span>
                </a>
            </div>
        </div>
    </form>
</div>
105
106
107
108
109
<div class="files-buttons">
    <a href="#" id="json-export" class="btn btn-info"><%= l('Export localStorage data') %></a>
    <a href="#" id="json-import" class="btn btn-info"><%= l('Import localStorage data') %></a>
    <input type="file" class="hidden" id="import">
</div>
110
111
112
113
<div class="table-responsive">
    <table class="table table-hover">
        <thead>
            <tr>
114
                <th class="text-center"><span class="checkbox"><label><input type="checkbox" id="check-all"><label></span></th>
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
                <th class="text-center"><%= l('File name') %></th>
                <th class="text-center"><%= l('View link') %></th>
                <th class="text-center"><%= l('Counter') %></th>
                <th class="text-center"><%= l('Delete at first view?') %></th>
                <th class="text-center"><%= l('Uploaded at') %></th>
                <th class="text-center"><%= l('Expires at') %></th>
                <th class="text-center"><%= l('Deletion link') %></th>
            </tr>
        </thead>
        <tbody id="myfiles">
        </tbody>
    </table>
</div>

<%= link_to url_for('/') => ( class => "btn btn-primary btn-lg" ) => begin %><%= l('Back to homepage') %><% end%>