~lars-luthman-deactivatedaccount/ppvalbok/remove-bookings

« back to all changes in this revision

Viewing changes to templates/calculate_distribution.html

  • Committer: Lars Luthman
  • Date: 2009-04-22 14:31:02 UTC
  • Revision ID: lars.luthman@gmail.com-20090422143102-5t7zqdwantkifwek
Renamed VotingLocal to EarlyVotingStation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        add_region_entry(result, '{{ subregion.shortname }}', 
106
106
                         {{ subregion.total_voters }});
107
107
        {% endfor %}
108
 
        {% for local in locals %}
109
 
        add_early_entry(result, {{ local.pk }});
 
108
        {% for station in early_stations %}
 
109
        add_early_entry(result, {{ station.pk }});
110
110
        {% endfor %}
111
111
        {% for station in stations %}
112
112
        add_station_entry(result, {{ station.pk }},
128
128
        var unit = parse_int_from_input('unit_size');
129
129
        if (isNaN(unit))
130
130
          return false;
131
 
        {% if locals %}
 
131
        {% if early_stations %}
132
132
        var early_percentage = parse_int_from_input('early_percentage');
133
133
        if (isNaN(early_percentage))
134
134
          return false;
173
173
        var unit = parse_int_from_input('unit_size');
174
174
        if (isNaN(unit))
175
175
          return false;
176
 
        {% if locals %}
 
176
        {% if early_stations %}
177
177
        var early_percentage = parse_int_from_input('early_percentage');
178
178
        if (isNaN(early_percentage))
179
179
          return false;
265
265
          </div>
266
266
        </div>
267
267
 
268
 
        {% if locals %}
 
268
        {% if early_stations %}
269
269
        <div>
270
270
          <div>
271
271
            F&ouml;rtidsr&ouml;stning (procent):
356
356
      </div>
357
357
      {% endif %}
358
358
 
359
 
      {% if locals %}
 
359
      {% if early_stations %}
360
360
      <h3>F&ouml;rtidsr&ouml;stningslokaler</h3>
361
 
      <div id="locallist" class="calc_result">
 
361
      <div id="early_station_list" class="calc_result">
362
362
        <div class="calc_result_header">
363
363
          <div>Namn</div>
364
364
          <div>Antal valsedlar</div>
365
365
          <div>L&aring;st</div>
366
366
        </div>
367
 
        {% for local in locals %}
 
367
        {% for station in early_stations %}
368
368
        <div class="calc_result_entry">
369
369
          <div>
370
 
            {% if local.user %}
 
370
            {% if station.user %}
371
371
            <img src="{{MEDIA_URL}}images/green_check.png" 
372
372
              alt="Vallokalen &auml;r bokad" 
373
373
              title="Vallokalen &auml;r bokad">
376
376
              alt="Vallokalen &auml;r inte bokad"
377
377
              title="Vallokalen &auml;r inte bokad">
378
378
            {% endif %}
379
 
            <a href="../{{ local.pk }}/">
380
 
              {% if local.name %}{{ local.name }}{% else %}<i>Namn saknas</i>{% endif %}</a>
 
379
            <a href="../{{ station.pk }}/">
 
380
              {% if station.name %}{{ station.name }}{% else %}<i>Namn saknas</i>{% endif %}</a>
381
381
          </div>
382
382
          <div>
383
 
            <input type="text" id="early_{{ local.pk }}_value"
384
 
              name="early_{{ local.pk }}_value" 
385
 
              class="early_value" value="{{ local.ballots }}"
386
 
              {% if local.ballots_locked %}disabled="disabled"{% endif %}/>
 
383
            <input type="text" id="early_{{ station.pk }}_value"
 
384
              name="early_{{ station.pk }}_value" 
 
385
              class="early_value" value="{{ station.ballots }}"
 
386
              {% if station.ballots_locked %}disabled="disabled"{% endif %}/>
387
387
          </div>
388
388
          <div>
389
389
            <input type="checkbox"
390
 
              id="early_{{ local.pk }}_value_lock"
391
 
              name="early_{{ local.pk }}_value_lock"
392
 
              onchange="checkbox_changed('early_{{ local.pk }}_value'); return false;"
393
 
            {% if local.ballots_locked %}
 
390
              id="early_{{ station.pk }}_value_lock"
 
391
              name="early_{{ station.pk }}_value_lock"
 
392
              onchange="checkbox_changed('early_{{ station.pk }}_value'); return false;"
 
393
            {% if station.ballots_locked %}
394
394
            checked="checked"
395
395
            {% endif %}
396
396
            />