mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
Merge branch 'pedagogy_v2' into 'master'
Better display on mobile for guide page See merge request ae/Sith!221
This commit is contained in:
commit
824ea37f44
@ -1694,6 +1694,10 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.grade-without-star {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: $large-devices){
|
@media screen and (max-width: $large-devices){
|
||||||
&.star-not-checked {
|
&.star-not-checked {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
@ -1705,11 +1709,19 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: $small-devices){
|
||||||
|
&.grade-without-star {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
&.grade-with-star {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#dynamic_view {
|
#dynamic_view {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
|
|
||||||
table {
|
overflow-wrap: break-word;
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -1719,20 +1731,72 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#search_form {
|
#search_form {
|
||||||
margin: 0px;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.input-search {
|
.search-form-container {
|
||||||
background: $pedagogy-light-blue;
|
display: grid;
|
||||||
width: 300px;
|
grid-template-columns: auto auto;
|
||||||
height: 21px;
|
grid-template-rows: auto auto auto;
|
||||||
|
grid-template-areas:
|
||||||
|
"action-bar action-bar"
|
||||||
|
"search-bar search-bar"
|
||||||
|
"radio-department radio-department"
|
||||||
|
"radio-credit-type radio-semester";
|
||||||
}
|
}
|
||||||
.button-search {
|
|
||||||
background: $pedagogy-orange;
|
.action-bar {
|
||||||
color: white;
|
grid-area: action-bar;
|
||||||
font-weight: bold;
|
margin-bottom: 10px;
|
||||||
margin-left: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-bar {
|
||||||
|
grid-area: search-bar;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 200px;
|
||||||
|
grid-template-rows: auto;
|
||||||
|
grid-template-areas: "search-bar-input search-bar-button";
|
||||||
|
|
||||||
|
@media screen and (max-width: $medium-devices){
|
||||||
|
grid-template-columns: auto auto;
|
||||||
|
grid-template-rows: auto;
|
||||||
|
grid-template-areas: "search-bar-input search-bar-button";
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: $small-devices){
|
||||||
|
grid-template-columns: auto;
|
||||||
|
grid-template-rows: auto;
|
||||||
|
grid-template-areas: "search-bar-input";
|
||||||
|
|
||||||
|
.search-bar-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar-input {
|
||||||
|
grid-area: search-bar-input;
|
||||||
|
background: $pedagogy-light-blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar-button {
|
||||||
|
grid-area: search-bar-button;
|
||||||
|
background: $pedagogy-orange;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-department {
|
||||||
|
grid-area: radio-department;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-credit-type {
|
||||||
|
grid-area: radio-credit-type;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-semester {
|
||||||
|
grid-area: radio-semester;
|
||||||
|
}
|
||||||
|
|
||||||
.radio-guide input[type="radio"],input[type="checkbox"] {
|
.radio-guide input[type="radio"],input[type="checkbox"] {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
@ -1741,25 +1805,21 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.radio-guide label {
|
.radio-guide label {
|
||||||
display:inline-block;
|
display: inline-block;
|
||||||
background-color: $pedagogy-blue;
|
background-color: $pedagogy-blue;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
font-family:Arial;
|
font-family: Arial, sans-serif;
|
||||||
font-size:16px;
|
font-size: 16px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.radio-guide input[type="radio"]:checked + label {
|
.radio-guide input[type="radio"]:checked + label {
|
||||||
background-color:$pedagogy-orange;
|
background-color: $pedagogy-orange;
|
||||||
}
|
}
|
||||||
.radio-guide input[type="checkbox"]:checked + label {
|
.radio-guide input[type="checkbox"]:checked + label {
|
||||||
background-color:$pedagogy-orange;
|
background-color: $pedagogy-orange;
|
||||||
}
|
}
|
||||||
.radio-guide label:hover {
|
.radio-guide label:hover {
|
||||||
background-color: $pedagogy-hover-blue;
|
background-color: $pedagogy-hover-blue;
|
||||||
}
|
|
||||||
|
|
||||||
#radioAUTUMN + label {
|
|
||||||
margin-left: 50px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,38 +5,54 @@
|
|||||||
{% trans %}UV Guide{% endtrans %}
|
{% trans %}UV Guide{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=0.6, maximum-scale=2">
|
||||||
|
{% endblock head %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="pedagogy">
|
<div class="pedagogy">
|
||||||
<form id="search_form" action="{{ url('pedagogy:guide') }}" method="get">
|
<form id="search_form" action="{{ url('pedagogy:guide') }}" method="get">
|
||||||
{% if can_create_uv(user) %}
|
<div class="search-form-container">
|
||||||
<p>
|
{% if can_create_uv(user) %}
|
||||||
<a href="{{ url('pedagogy:uv_create') }}">{% trans %}Create UV{% endtrans %}</a>
|
<div class="action-bar">
|
||||||
</p>
|
<p>
|
||||||
<p>
|
<a href="{{ url('pedagogy:uv_create') }}">{% trans %}Create UV{% endtrans %}</a>
|
||||||
<a href="{{ url('pedagogy:moderation') }}">{% trans %}Moderate comments{% endtrans %}</a>
|
</p>
|
||||||
</p>
|
<p>
|
||||||
{% endif %}
|
<a href="{{ url('pedagogy:moderation') }}">{% trans %}Moderate comments{% endtrans %}</a>
|
||||||
<p>
|
</p>
|
||||||
<input id="search_input" class="input-search" type="text" name="search">
|
</div>
|
||||||
<button class="button-search">{% trans %}Search{% endtrans %}</button>
|
{% endif %}
|
||||||
</p>
|
<div class="search-bar">
|
||||||
<div class="radio-guide">
|
<input id="search_input" class="search-bar-input" type="text" name="search">
|
||||||
{% for (display_name, real_name) in [("EDIM", "EDIM"), ("ENERGIE", "EE"), ("IMSI", "IMSI"), ("INFO", "GI"), ("GMC", "MC"), ("HUMA", "HUMA"), ("TC", "TC")] %}
|
<button class="search-bar-button">{% trans %}Search{% endtrans %}</button>
|
||||||
<input type="radio" name="department" id="radio{{ real_name }}" value="{{ real_name }}"><label for="radio{{ real_name }}">{% trans %}{{ display_name }}{% endtrans %}</label>
|
</div>
|
||||||
{% endfor %}
|
<div class="radio-department">
|
||||||
</div>
|
<div class="radio-guide">
|
||||||
<div class="radio-guide">
|
{% for (display_name, real_name) in [("EDIM", "EDIM"), ("ENERGIE", "EE"), ("IMSI", "IMSI"), ("INFO", "GI"), ("GMC", "MC"), ("HUMA", "HUMA"), ("TC", "TC")] %}
|
||||||
{% for credit_type in ["CS", "TM", "EC", "QC", "OM"] %}
|
<input type="radio" name="department" id="radio{{ real_name }}" value="{{ real_name }}"><label for="radio{{ real_name }}">{% trans %}{{ display_name }}{% endtrans %}</label>
|
||||||
<input type="radio" name="credit_type" id="radio{{ credit_type }}" value="{{ credit_type }}"><label for="radio{{ credit_type }}">{% trans %}{{ credit_type }}{% endtrans %}</label>
|
{% endfor %}
|
||||||
{% endfor %}
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="radio-credit-type">
|
||||||
|
<div class="radio-guide">
|
||||||
|
{% for credit_type in ["CS", "TM", "EC", "QC", "OM"] %}
|
||||||
|
<input type="radio" name="credit_type" id="radio{{ credit_type }}" value="{{ credit_type }}"><label for="radio{{ credit_type }}">{% trans %}{{ credit_type }}{% endtrans %}</label>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<input type="checkbox" name="semester" id="radioAUTUMN" value="AUTUMN"><label for="radioAUTUMN"><i class="fa fa-leaf"></i></label>
|
<div class="radio-semester">
|
||||||
<input type="checkbox" name="semester" id="radioSPRING" value="SPRING"><label for="radioSPRING"><i class="fa fa-sun-o"></i></label>
|
<div class="radio-guide">
|
||||||
<span><input type="checkbox" name="semester" id="radioAP" value="AUTUMN_AND_SPRING"><label for="radioAP">AP</label></span>
|
<input type="checkbox" name="semester" id="radioAUTUMN" value="AUTUMN"><label for="radioAUTUMN"><i class="fa fa-leaf"></i></label>
|
||||||
|
<input type="checkbox" name="semester" id="radioSPRING" value="SPRING"><label for="radioSPRING"><i class="fa fa-sun-o"></i></label>
|
||||||
|
<span><input type="checkbox" name="semester" id="radioAP" value="AUTUMN_AND_SPRING"><label for="radioAP">AP</label></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="text" name="json" hidden>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" name="json" hidden>
|
|
||||||
</form>
|
</form>
|
||||||
<br>
|
|
||||||
<table id="dynamic_view">
|
<table id="dynamic_view">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -3,11 +3,12 @@
|
|||||||
{% if grade >= 0 %}
|
{% if grade >= 0 %}
|
||||||
{% for i in range(5) %}
|
{% for i in range(5) %}
|
||||||
{% if i <= grade %}
|
{% if i <= grade %}
|
||||||
<span class="fa fa-star pedagogy star-checked"></span>
|
<span class="fa fa-star pedagogy star-checked grade-with-star"></span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="fa fa-star pedagogy star-not-checked"></span>
|
<span class="fa fa-star pedagogy star-not-checked grade-with-star"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<span class="pedagogy grade-without-star">{{ grade }}/5</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="grade-text"> {% trans %} not rated {% endtrans %} </span>
|
<span class="grade-text"> {% trans %} not rated {% endtrans %} </span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user