1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Added users page

This commit is contained in:
Retspen 2015-03-02 10:52:07 +02:00
parent 0c63e00711
commit 29b05745ad
16 changed files with 112 additions and 16 deletions

View file

@ -0,0 +1,20 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Compute" %}{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row">
{% include 'sidebar.html' %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
<h1 class="page-header">{{ compute.name }}</h1>
{% include 'errors.html' %}
</div>
</div>
</div>
{% endblock %}

View file

@ -6,7 +6,7 @@
<ul class="nav nav-sidebar">
<li {% active request "^/instance" %}><a href="{% url 'instances' %}"><span class="glyphicon glyphicon-th" aria-hidden="true"></span></a></li>
<li {% active request "^/compute" %}><a href="{% url 'computes' %}"><span class="glyphicon glyphicon-tasks" aria-hidden="true"></span></a></li>
<li {% active request "^/accaunt" %}><a href="#"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></a></li>
<li {% active request "^/user" %}><a href="{% url 'users' %}"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></a></li>
<li class="bottom-sticky">
<a href="#"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span></a>
<a href="{% url 'logout' %}"><span class="glyphicon glyphicon-log-out" aria-hidden="true"></span></a>

21
templates/user.html Normal file
View file

@ -0,0 +1,21 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Accounts" %}{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row">
{% include 'sidebar.html' %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
<h1 class="page-header">{{ user.username }}</h1>
{% include 'errors.html' %}
{{ user }}
</div>
</div>
</div>
{% endblock %}

38
templates/users.html Normal file
View file

@ -0,0 +1,38 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Users" %}{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row">
{% include 'sidebar.html' %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
<h1 class="page-header">{% trans "Accounts" %}</h1>
{% include 'errors.html' %}
{% for user in users %}
<div id="{{ user.username }}" class="col-xs-6 col-sm-4">
<div class="panel {% if user.is_active %}panel-success{% else %}panel-danger{% endif %} panel-data">
<div class="panel-heading">
<h3 class="panel-title"><strong>{{ user.username }}</strong>
<a data-toggle="modal" href="{% url 'user' user.id %}" class="pull-right"
title="{% trans "Edit" %}">
<span class="glyphicon glyphicon-cog"></span>
</a>
</h3>
</div>
<div class="panel-body">
<p>Status: {% if user.is_active %}Active{% else %}Blocked{% endif %}
</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}