summaryrefslogtreecommitdiff
path: root/templates/layouts/default.html.ep
blob: 58669c6a02a6c1cc221f10be12b2e85ac5b2810a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html>
<head>
	<title><%= stash('title') // 'db-infoscreen' %></title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
% if ($self->stash('refresh_interval')) {
	<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>
% }


	%= stylesheet '/default.css'
% if ($self->browser->mobile) {
	%= stylesheet '/mobile.css'
% }
	%= javascript '/jquery-1.10.2.min.js'
	%= javascript '/collapse.js'
	%= javascript '/marquee.js'
	%= javascript begin
	$(function () {  $('marquee').marquee() });
	% end
</head>
<body style="<%= (stash('hide_opts') ? 'margin: 0; padding: 0;' : q{}) %>">

% if (my $error = stash 'error') {
<div class="error">Backend-Fehler:</div>
<div>
<pre>
%= $error
</pre>
</div>
% }

% if (time() < 1420178400 and param('backend') and (param('backend') eq 'iris' ) ) {
<div class="error">Note: Due to an unknown problem on the Deutsche Bahn IRIS
server, no schedule data is available. This service will resume operation
on 2015-01-02 at 07:00 CET.</div>
% }

%= content

% if (stash 'show_intro') {
<p>
  Diese Seite ist ein Frontend zum IRIS (Abfahrtsmonitor)
  der Deutschen Bahn. Sie kann wahlweise die in Bahnhofshallen / an
  Haltestellen montierten Anzeigen nachahmen oder einen Handy- und
  Infoscreen-taugliche Abfahrtsmonitor liefern.
</p>
<p>
  Als Backend werden sowohl das RIS ("Reisenden-Informationssystem", d.h. der
  Bahn-Abfahrtsmonitor) als auch das IRIS ("Innerbetriebliches
  Reisenden-Informationssystem"?) unterstützt. Im Normalfall enthält das
  IRIS mehr und detailliertere Angaben.
</p>
<p>
Alle Angaben ohne Gewähr.
</p>
% }


% if (not stash('hide_opts')) {
<div class="input-field">


%= form_for _redirect => begin
<div>
  <div class="field">
    <div class="desc">Bahnhof / Haltestelle</div>
    <div>
% if (stash('stationlist')) {
      %= select_field station => stash('stationlist')
% }
% else {
      %= text_field 'station'
% }
    </div>
  </div>
  <div class="field">
    <div class="desc">
      Frontend
    </div>
    <div>
      %= select_field mode => [ ['App / Infoscreen' => 'clean'], ['Bahnhofstafel' => 'multi'], ['Gleis' => 'single'] ]
    </div>
  </div>
  <div class="field">
    <div class="desc">
      Backend
    </div>
    <div>
      %= select_field backend => [ ['IRIS' => 'iris'], ['RIS' => 'ris'] ]
    </div>
  </div>
  <div class="field">
    %= submit_button 'Anzeigen'
  <div>
  </div>
  <div class="break"></div>
  <span class="optional">Optionale Einstellungen:</span>
  <div class="field">
    <div class="desc">
      Nur Züge über
    </div>
    <div>
      %= text_field 'via'
    </div>
  </div>
  <div class="field">
    <div class="desc">
      Gleise
    </div>
    <div>
      %= text_field 'platforms'
    </div>
  </div>
  <div class="field">
    <div class="desc">
      Verspätungen &lt;5 Minuten ignorieren
    </div>
    <div>
      %= check_box 'hidelowdelay' => 1
    </div>
  </div>
  <div class="field">
    <div class="desc">
      Formular verstecken
    </div>
    <div>
      %= check_box 'hide_opts' => 1
    </div>
  </div>
  <div class="break"></div>
  <span class="optional">Nur für IRIS-Backend:</span>
  <div class="field">
    <div class="desc">
      Ankunfts- oder Abfahrtszeiten
    </div>
    <div>
      %= select_field admode => [['Abfahrt bevorzugen' => 'deparr'], ['Nur Abfahrt' => 'dep'], ['Nur Ankunft' => 'arr']]
    </div>
  </div>
  <div class="field">
    <div class="desc">
      Erwartete Zeiten statt Fahrplandaten
    </div>
    <div>
      %= check_box 'show_realtime' => 1
    </div>
  </div>
</div>
% end

</div> <!-- input-field -->

<div class="notes">
<span class="notes">Anmerkungen:</span>
<ul>
<li>Umlaute werden nicht bei allen Backend/Layout-Kombinationen korrekt unterstützt.
Wenn etwas nicht funktioniert helfen meist
Umschreibungen der Art ä → ae oder ä → a</li>
<li>Das RIS-Backend ist deprecated und wird bald ausgetauscht oder entfernt</li>
</ul>
</div> <!-- notes -->

<div class="notes">
<span class="notes">Beispiele:</span>
<ul>
<li><a href="/Essen%20Hbf?mode=multi">Essen HBf</a> (IRIS, Bahnhofstafel)</li>
<li><a href="/Dortmund/Bochum%7CHamm?mode=multi">Dortmund HBf</a> (IRIS, Bahnhofstafel,
nur Züge via Bochum oder Hamm)</li>
<li><a href="/Dortmund%20Uni?mode=clean">Dortmund Universit&auml;t</a> (IRIS, Mobile/Infoscreen)</li>
<li><a href="/KD?mode=single">D&uuml;sseldorf HBf</a> (IRIS, Gleistafel)</li>
</ul>
</div>

<div class="notes">
<span class="notes">Siehe auch:</span>
<ul>
<li><a href="http://reiseauskunft.bahn.de/bin/bhftafel.exe/dn">DeutscheBahn RIS</a></li>
<li><a href="http://marudor.de/">Handyfreundliches Interface</a> von <a href="https://twitter.com/marudor">@marudor</a></li>
<li><a href="https://iris.noncd.db.de/wbt/js/index.html?typ=ab&amp;style=qrab&amp;bhf=EE&amp;SecLang=&amp;Zeilen=40&amp;footer=0&amp;disrupt=1"
>DeutscheBahn IRIS</a> und <a href="http://www.db-netz.de/file/2361656/data/betriebsstellen.pdf">betriebsstellen.pdf</a></li>
<li><a href="http://vrrf.finalrewind.org/">vrr-infoscreen</a></li>
</ul>
</div> <!-- notes -->

<div class="about">
<a href="http://finalrewind.org/projects/db-fakedisplay/">db-infoscreen</a>
v<%= stash('version') // '???' %><br/>
Backends:<br/>
<a href="http://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a>
v<%= $Travel::Status::DE::HAFAS::VERSION %><br/>
<a href="http://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a>
v<%= $Travel::Status::DE::IRIS::VERSION %><br/>
</div>
% }

</body>
</html>