further removal of academicness
This commit is contained in:
parent
18457f9ced
commit
dca9666984
@ -26,8 +26,8 @@ class UploadForm(FlaskForm):
|
||||
"Name of your archive section:",
|
||||
validators=[validators.InputRequired(), Length(2, 100), _distribusiname],
|
||||
)
|
||||
academicyear = SelectField(
|
||||
"Year",
|
||||
year = SelectField(
|
||||
"Year:",
|
||||
validate_choice=True,
|
||||
coerce=str,
|
||||
choices=[
|
||||
@ -44,7 +44,7 @@ class UploadForm(FlaskForm):
|
||||
option_widget=None,
|
||||
validators=[DataRequired()]
|
||||
)
|
||||
term = SelectField(
|
||||
category = SelectField(
|
||||
"Category:",
|
||||
validate_choice=True,
|
||||
coerce=str,
|
||||
@ -64,20 +64,6 @@ class UploadForm(FlaskForm):
|
||||
validators=[validators.InputRequired(), Length(2, 500)],
|
||||
)
|
||||
|
||||
course = SelectField(
|
||||
u'Course:',
|
||||
validate_choice=True,
|
||||
coerce=str,
|
||||
choices=[
|
||||
('hacking', u'Autonomous - Hacking'),
|
||||
('digitalcraft', u'Autonomous - Digital Craft'),
|
||||
('criticalstudies', u'Autonomous - Critical Studies'),
|
||||
('publicprivate', u'Autonomous - Public&Private'),
|
||||
],
|
||||
option_widget=None,
|
||||
validators=[DataRequired()]
|
||||
)
|
||||
|
||||
zipfile = FileField(
|
||||
"Upload your zip file with content here:",
|
||||
validators=[
|
||||
|
@ -65,23 +65,21 @@ def index():
|
||||
singledistribusi = {
|
||||
"username": user.username,
|
||||
"publictheme": distribusi.publictheme,
|
||||
"term": distribusi.term,
|
||||
"category": distribusi.term,
|
||||
"course": distribusi.course,
|
||||
"year": distribusi.year,
|
||||
"tags": distribusi.tags.split(","),
|
||||
}
|
||||
distribusisindex[distribusi.distribusiname] = singledistribusi
|
||||
years = uploadform.academicyear.choices
|
||||
terms = uploadform.term.choices
|
||||
courses = uploadform.course.choices
|
||||
years = uploadform.year.choices
|
||||
categories = uploadform.category.choices
|
||||
|
||||
adminuser = isadminuser()
|
||||
template = render_template(
|
||||
"index.html",
|
||||
distribusisindex=distribusisindex,
|
||||
years=years,
|
||||
terms=terms,
|
||||
courses=courses,
|
||||
categories=categories,
|
||||
adminuser=adminuser,
|
||||
)
|
||||
return template
|
||||
|
@ -1,28 +1,20 @@
|
||||
{% block menu %}
|
||||
<button onclick="filterSelection('all')" id="removefilter">Remove filter</button>
|
||||
<div class="dropdown">
|
||||
<button id="Academicyear" class="dropbtn">Academic year</button>
|
||||
<button id="Year" class="dropbtn">Year</button>
|
||||
<div class="dropdown-content">
|
||||
{% for year in years %}
|
||||
<button type="button" name="button" onclick="filterSelection('{{ year[0] }}', '{{ year[1] }}', 'Academicyear')" >{{ year[1] }}</button>
|
||||
<button type="button" name="button" onclick="filterSelection('{{ year[0] }}', '{{ year[1] }}', 'Year')" >{{ year[1] }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button id="Term" class="dropbtn">Term</button>
|
||||
<button id="Category" class="dropbtn">Category</button>
|
||||
<div class="dropdown-content">
|
||||
{% for term in terms %}
|
||||
<button type="button" name="button" onclick="filterSelection('{{ term[0] }}', '{{ term[1] }}', 'Term')" >{{ term[1] }}</button>
|
||||
{% for category in categories %}
|
||||
<button type="button" name="button" onclick="filterSelection('{{ category[0] }}', '{{ category[1] }}', 'Category')" >{{ category[1] }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button id="Course" class="dropbtn">Course</button>
|
||||
<div class="dropdown-content">
|
||||
{% for course in courses %}
|
||||
<button type="button" name="button" onclick="filterSelection('{{ course[0] }}' , '{{ course[1] }}', 'Course')" >{{ course[1] }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<input id="tagsearch" type="text" placeholder="Search..">
|
||||
{% endblock menu %}
|
||||
|
@ -53,7 +53,7 @@
|
||||
{% include 'filtermenu.html' %}
|
||||
<ul id="distribusi-index">
|
||||
{% for name, distribusi in distribusisindex.items() %}
|
||||
<li class='distribusi filter {{ distribusi["term"] }} {{ distribusi["year"] }} {{ distribusi["course"] }}'>
|
||||
<li class='distribusi filter {{ distribusi["category"] }} {{ distribusi["year"] }} '>
|
||||
<a href='stash/{{name}}/index.html'>{{distribusi["username"]}}:{{name}}</a>
|
||||
{% for tag in distribusi["tags"] %}
|
||||
<span class="tags">{{tag}}</span>
|
||||
|
Loading…
Reference in New Issue
Block a user