summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/view_import_csv.html
blob: ba9f43d509b9e76e03dd1b23bb7553ff86bd17a5 (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
{% load i18n l10n %}

<div class="modal-dialog full modal-lg">
    <div class="modal-content">
        <div class="modal-header">
            <h2>{{ title }} |
                <i class="{{icon}}" aria-hidden="true"></i>
                {{target}}
            </h2>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
        <div class="table-scroll">
           <table class="table table-striped table-bordered" data-import="{{import_id}}">
              <thead>
              <tr>
                  <th>&nbsp;</th>
                  {% if has_line_errors %}<th>{% trans "Ignore" %}</th>{% endif %}
                  {% for head in header %}<th>{{head}}</th>{% endfor %}
              </tr>
              </thead>
              <tbody>
              {% for line in content %}
              <tr{% if has_line_errors and line.0.1 %} class="import-line-ignored"{% endif%}>
                  <td>{{ forloop.counter }}</td>
                  {% for cell in line %}<td>
                      {% if has_line_errors and not forloop.counter0 %}<input class="check-ignored" value="{{cell.0}}"{% if cell.1%} checked="checked"{% endif %} type="checkbox" />{% else %}{{cell}}{% endif %}
                  </td>{% endfor %}
              </tr>{% endfor %}
              </tbody>
            </table>
        </div>
    </div>
</div>
<script type="text/javascript">{% localize off %}
$(".check-ignored").click(import_csv_check_ignored);
{% endlocalize %}</script>