| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- {% extends '_base.html' %}
- {% load helpers %}
- {% block header %}
- <div class="row">
- <div class="col-sm-8 col-md-9">
- <ol class="breadcrumb">
- <li><a href="{% url 'extras:configcontext_list' %}">Config Contexts</a></li>
- <li>{{ configcontext }}</li>
- </ol>
- </div>
- <div class="col-sm-4 col-md-3">
- <form action="{% url 'extras:configcontext_list' %}" method="get">
- <div class="input-group">
- <input type="text" name="q" class="form-control" />
- <span class="input-group-btn">
- <button type="submit" class="btn btn-primary">
- <span class="fa fa-search" aria-hidden="true"></span>
- </button>
- </span>
- </div>
- </form>
- </div>
- </div>
- <div class="pull-right">
- {% if perms.extras.change_configcontext %}
- <a href="{% url 'extras:configcontext_edit' pk=configcontext.pk %}" class="btn btn-warning">
- <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
- Edit this config context
- </a>
- {% endif %}
- </div>
- <h1>{% block title %}{{ configcontext }}{% endblock %}</h1>
- {% endblock %}
- {% block content %}
- <div class="row">
- <div class="col-md-5">
- <div class="panel panel-default">
- <div class="panel-heading">
- <strong>Config Context</strong>
- </div>
- <table class="table table-hover panel-body attr-table">
- <tr>
- <td>Name</td>
- <td>
- {{ configcontext.name }}
- </td>
- </tr>
- <tr>
- <td>Weight</td>
- <td>
- {{ configcontext.weight }}
- </td>
- </tr>
- <tr>
- <td>Description</td>
- <td>
- {% if configcontext.description %}
- {{ configcontext.description }}
- {% else %}
- <span class="text-muted">N/A</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>Active</td>
- <td>
- {% if configcontext.is_active %}
- <span class="text-success">
- <i class="fa fa-check"></i>
- </span>
- {% else %}
- <span class="text-danger">
- <i class="fa fa-close"></i>
- </span>
- {% endif %}
- </td>
- </tr>
- </table>
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">
- <strong>Assignment</strong>
- </div>
- <table class="table table-hover panel-body attr-table">
- <tr>
- <td>Regions</td>
- <td>
- {% if configcontext.regions.all %}
- <ul>
- {% for region in configcontext.regions.all %}
- <li><a href="{{ region.get_absolute_url }}">{{ region }}</a></li>
- {% endfor %}
- </ul>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>Sites</td>
- <td>
- {% if configcontext.sites.all %}
- <ul>
- {% for site in configcontext.sites.all %}
- <li><a href="{{ site.get_absolute_url }}">{{ site }}</a></li>
- {% endfor %}
- </ul>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>Roles</td>
- <td>
- {% if configcontext.roles.all %}
- <ul>
- {% for role in configcontext.roles.all %}
- <li><a href="{{ role.get_absolute_url }}">{{ role }}</a></li>
- {% endfor %}
- </ul>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>Platforms</td>
- <td>
- {% if configcontext.platforms.all %}
- <ul>
- {% for platform in configcontext.platforms.all %}
- <li><a href="{{ platform.get_absolute_url }}">{{ platform }}</a></li>
- {% endfor %}
- </ul>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>Tenant Groups</td>
- <td>
- {% if configcontext.tenant_groups.all %}
- <ul>
- {% for tenant_group in configcontext.tenant_groups.all %}
- <li><a href="{{ tenant_group.get_absolute_url }}">{{ tenant_group }}</a></li>
- {% endfor %}
- </ul>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>Tenants</td>
- <td>
- {% if configcontext.tenants.all %}
- <ul>
- {% for tenant in configcontext.tenants.all %}
- <li><a href="{{ tenant.get_absolute_url }}">{{ tenant }}</a></li>
- {% endfor %}
- </ul>
- {% else %}
- <span class="text-muted">None</span>
- {% endif %}
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="col-md-7">
- <div class="panel panel-default">
- <div class="panel-heading">
- <strong>Data</strong>
- </div>
- <div class="panel-body">
- <pre>{{ configcontext.data|render_json }}</pre>
- </div>
- </div>
- </div>
- </div>
- {% endblock %}
|