core: show applications on overview page

This commit is contained in:
Jens Langhammer 2018-12-10 10:50:19 +01:00
parent 1a8f3fb18a
commit 19a8ecb55a
4 changed files with 24 additions and 51 deletions

View File

@ -36,4 +36,4 @@
</tbody>
</table>
</div>
{% endblock %}
{% endblock %}

View File

@ -2,11 +2,6 @@
{% csrf_token %}
{% for field in form %}
{% if field.help_text %}
<span>
{{ field.help_text }}
</span>
{% endif %}
<div class="form-group">
{% if field.field.widget|fieldtype == 'RadioSelect' %}
<label class="col-sm-2 control-label" {% if field.field.required %}class="required"{% endif %} for="{{ field.name }}-{{ forloop.counter0 }}">
@ -39,9 +34,15 @@
</label>
<div class="col-sm-10">
{{ field|css_class:'form-control' }}
{% if field.help_text %}
<span>
{{ field.help_text }}
</span>
{% endif %}
</div>
{% endif %}
{% for error in field.errors %}
{{error }}
<div class="alert alert-danger">
<div class="alert-items">
<div class="alert-item">

View File

@ -1,63 +1,33 @@
{% extends "overview/base.html" %}
{% load i18n %}
{% block content %}
<div class="container">
<div class="row row-cards-pf">
{% for app in applications %}
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status">
<h2 class="card-pf-title">
<span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">0</span> Ipsum
<span class="fa fa-shield"></span> {{ app.name }}
</h2>
<div class="card-pf-body">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><a href="#" class="add" data-toggle="tooltip"
data-placement="top" title="Add Ipsum"><span class="pficon pficon-add-circle-o"></span></a></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status">
<h2 class="card-pf-title">
<a href="#"><span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">20</span> Amet</a>
</h2>
<div class="card-pf-body">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><a href="#"><span class="pficon pficon-error-circle-o"></span>4</a></span>
<span class="card-pf-aggregate-status-notification"><a href="#"><span class="pficon pficon-warning-triangle-o"></span>1</a></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status">
<h2 class="card-pf-title">
<a href="#"><span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">9</span>
Adipiscing</a>
</h2>
<div class="card-pf-body">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><span class="pficon pficon-ok"></span></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status">
<h2 class="card-pf-title">
<a href="#"><span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">12</span> Lorem</a>
</h2>
<div class="card-pf-body">
<p class="card-pf-aggregate-status-notifications">
<a href="#"><span class="card-pf-aggregate-status-notification"><span class="pficon pficon-error-circle-o"></span>1</span></a>
<span class="card-pf-aggregate-status-notification">
<a href="{{ app.launch_url }}" class="add" data-toggle="tooltip" data-placement="top" title="{% trans 'Open App...' %}">
{% if not app.icon_url %}
<span class="pficon pficon-arrow"></span>
{% else %}
<img src="{{ app.icon_url }}" alt="{% trans 'Application Icon' %}">
{% endif %}
</a>
</span>
</p>
</div>
</div>
</div>
{% endfor %}
</div><!-- /row -->
</div>
{% endblock %}
{% endblock %}

View File

@ -2,8 +2,10 @@
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import TemplateView
from passbook.core.models import Application
class OverviewView(LoginRequiredMixin, TemplateView):
"""Overview for logged in user, incase user opens passbook directly
and is not being forwarded"""