Templates added
This commit is contained in:
109
Templates/groups/base.html
Normal file
109
Templates/groups/base.html
Normal file
@@ -0,0 +1,109 @@
|
||||
{% load heasarc_templates %}
|
||||
{% load srgcat_templates %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{% block title %}SRG ArXiv{% endblock %}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<META NAME="author" CONTENT="Roman Krivonos, email: krivonos [at] iki.rssi.ru">
|
||||
<META NAME="description" CONTENT="High Energy Astrophysics Department at IKI RAN (Moscow, Russia)">
|
||||
|
||||
<link rel="stylesheet" href="{% static 'jquery/jquery-ui-themes-1.12.1/jquery-ui.css' %}" type="text/css" media="all" />
|
||||
<script src="{% static 'jquery/jquery-3.5.1.min.js' %}" type="text/javascript"> </script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
|
||||
<script src="{% static 'jquery/jquery-ui-1.12.1/jquery-ui.min.js' %}" type="text/javascript"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
|
||||
|
||||
<script src="{% static 'js/sorted.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$( function() {
|
||||
$( document ).tooltip();
|
||||
} );
|
||||
</script>
|
||||
|
||||
<style>
|
||||
label {
|
||||
display: inline-block;
|
||||
width: 5em;
|
||||
}
|
||||
.dot {
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
background-color: #bbb;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
.dotr {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
background-color: red;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
.dotg {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
background-color: green;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
.dotb {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
background-color: blue;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="/"><span class="glyphicon glyphicon-list"></span> SRG.ArXiv</a>
|
||||
</div>
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle navbar-right" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-user"></span> {% trans 'Groups' %}
|
||||
<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
{% for group in user.groups.all %}
|
||||
<li><a href="/groups/{{ group.pk }}/info">{{ group }}</a></li>
|
||||
{% endfor %}
|
||||
<li><a href="/stats/">Web Analytics</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<a class="btn btn-danger navbar-btn navbar-right" role="button" href="/logbook/logout">{{ user.email }} <span class="glyphicon glyphicon-log-out"></span> Sign Out</a>
|
||||
{% else %}
|
||||
<a class="btn btn-danger navbar-btn navbar-right" role="button" href="/logbook/login"><span class="glyphicon glyphicon-log-in"></span> Sign In</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
44
Templates/groups/index.html
Normal file
44
Templates/groups/index.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends "groups/base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<h3>Registered SRG ArXiv groups</h3>
|
||||
<ul>
|
||||
{% for group in user.groups.all %}
|
||||
<li><a href="/groups/{{ group.pk }}/info">{{ group }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if django_group %}
|
||||
<h3>Группа: {{ django_group.name }}</h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Имя</th>
|
||||
<th scope="col">Фамилия</th>
|
||||
<th scope="col">Аккаунт</th>
|
||||
<th scope="col">Авторизация</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in django_group.user_set.all %}
|
||||
<tr>
|
||||
<td><strong>{{ user.first_name }}</strong></td>
|
||||
<td><strong>{{ user.last_name }}</strong></td>
|
||||
<td>{{ user }}</td>
|
||||
<td>{% if user.last_login %}{{ user.last_login|date:"d.m.Y" }}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user