summaryrefslogtreecommitdiff
path: root/themes/okadmin/templates/index.liquid
blob: d25100fafa11f1def1a2c1242f25b03b7d1ee406 (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
{% include 'partials/head' %}

{% include 'partials/flash' %}

<section class="index main">
  {% for pair in resources %}
  {% assign name = pair[0] %}
  {% assign resource = pair[1] %}

    <section class="resource-category {{name}}">
      <form action="{{resource.type}}/__batch__/" method="POST">
        <header>
          <h2>{{name | capitalize}}</h2>
        </header>
          <input type="hidden" name="_method" value="PUT">
          <ol class="resource-list">
          {% for data in resource.data %}
            <li>
              <a href="{{resource.type}}/{{data.id}}/">{{data.title}}</a>
              <input class="resource-input" type="hidden" name="{{resource.type}}[{{forloop.index0}}]" value='{{data | stringify}}'>
            </li>
          {% endfor %}
          </ol>
        <footer>
          <nav>
            <a class="btn cancel-btn" href="#">cancel</a>
            <button type="submit"
                class="btn save-btn" href="#">save</button>
            <a class="btn edit-btn active" href="#">sort</a>
            <a class="btn add-btn active" href="{{resource.type}}/__new__/">+</a>
          </nav>
        </footer>
      </form>
    </section>

  {% endfor %}
</section>

{% include 'partials/tail' %}