config.index.html 1.87 KB
{% extends "layout-with-topbar.html" %}

{% block content %}

{% include "block.config.save.html" %}

<table class="table table-striped table-hover">
    
{% for scope, items in configs %}
    <tr style="background-color: white;">
        <th colspan=2 id="config.{{ scope }}">
            <h2>
                {{ scope }}
            </h2>
        </th>
    </tr>
    
    {% for keyword, value in items|dictsort %}
    <tr>
        <td id="config.{{ scope }}.{{ keyword }}">
            <strong>{{ keyword }}</strong>
            
            <div class="hidden-md hidden-lg">

                {% if isMask(scope, keyword) %}
                    ********
                {% else %}
                    {{ value }}
                {% endif %}
                
                <br/>
                <br/>
                
                <a class="btn btn-warning" role="button" href="/config/edit/{{ scope }}/{{ keyword }}">Edit</a>
                <a class="btn btn-danger" role="button" href="/config/ask-delete/{{ scope }}/{{ keyword }}">Delete</a>

            </div>
        </td>
        
        <td class="hidden-xs hidden-sm">
        {% if isMask(scope, keyword) %}
            ********
        {% else %}
            {{ value }}
        {% endif %}
        
            <br/>
            
            <a class="btn btn-warning" role="button" href="/config/edit/{{ scope }}/{{ keyword }}">Edit</a>
            <a class="btn btn-danger" role="button" href="/config/ask-delete/{{ scope }}/{{ keyword }}">Delete</a>
        </td>
        
    </tr>
    {% endfor %}
    
    <tr style="background-color: white;">
        <td colspan=3 style="padding-bottom: 4em;">
            <a class="btn btn-info" role="button" href="/config/add/{{ scope }}">Tambah item pada scope {{ scope }}</a>
        </td>
    </tr>
    
{% endfor %} 
        
</table>

{% include "block.config.save.html" %}

{% endblock %}