SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
ebce9765
Commit
ebce9765
authored
11 months ago
by
George Katsikas
Browse files
Options
Downloads
Patches
Plain Diff
add recent past (last year) sponsors in grid
fixes
#235
parent
4eabca45
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scipost_django/sponsors/templates/sponsors/sponsors.html
+19
-3
19 additions, 3 deletions
scipost_django/sponsors/templates/sponsors/sponsors.html
scipost_django/sponsors/views.py
+11
-0
11 additions, 0 deletions
scipost_django/sponsors/views.py
with
30 additions
and
3 deletions
scipost_django/sponsors/templates/sponsors/sponsors.html
+
19
−
3
View file @
ebce9765
...
...
@@ -93,27 +93,43 @@
{% endfor %}
</div>
<h3
class=
"highlight"
>
€
10k and above:
</h3>
<h3
class=
"highlight
mt-4
"
>
€
10k and above:
</h3>
<div
class=
"d-grid gap-3"
style=
"grid-template-columns: repeat(3, minmax(0, 1fr));"
>
{% for sponsor in sponsors_10kplus %}
{% include 'sponsors/_sponsor_card.html' with sponsor=sponsor %}
{% endfor %}
</div>
<h3
class=
"highlight"
>
€
5k and above:
</h3>
<h3
class=
"highlight
mt-4
"
>
€
5k and above:
</h3>
<div
class=
"d-grid gap-3"
style=
"grid-template-columns: repeat(3, minmax(0, 1fr));"
>
{% for sponsor in sponsors_5kplus %}
{% include 'sponsors/_sponsor_card.html' with sponsor=sponsor %}
{% endfor %}
</div>
<h3
class=
"highlight"
>
Our other current Sponsors:
</h3>
<h3
class=
"highlight
mt-4
"
>
Our other current Sponsors:
</h3>
<div
class=
"d-grid gap-3"
style=
"grid-template-columns: repeat(3, minmax(0, 1fr));"
>
{% for sponsor in current_sponsors %}
{% include 'sponsors/_sponsor_card.html' with sponsor=sponsor %}
{% endfor %}
</div>
<h1
class=
"highlight"
>
Our recent-past Sponsors
</h1>
<hgroup
class=
"p-2 highlight d-flex align-items-center justify-content-between"
>
<h3
class=
"m-0"
>
Last year's Sponsors:
</h3>
<span
class=
"text-muted"
>
(excludes current sponsors)
</span>
</hgroup>
<div
class=
"d-grid gap-3"
style=
"grid-template-columns: repeat(3, minmax(0, 1fr));"
>
{% for sponsor in last_year_sponsors %}
{% include 'sponsors/_sponsor_card.html' with sponsor=sponsor %}
{% endfor %}
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
scipost_django/sponsors/views.py
+
11
−
0
View file @
ebce9765
...
...
@@ -2,6 +2,7 @@ __copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)"
__license__
=
"
AGPL v3
"
import
datetime
from
django.shortcuts
import
render
from
organizations.models
import
Organization
...
...
@@ -14,10 +15,20 @@ def sponsors(request):
current_sponsors
=
(
Organization
.
objects
.
current_sponsors
().
with_subsidy_above_and_up_to
(
0
,
5000
)
)
last_year_sponsors
=
(
Organization
.
objects
.
all_sponsors
()
.
filter
(
subsidy__date_until__year__lte
=
datetime
.
date
.
today
().
year
-
1
,
subsidy__date_until__gt
=
datetime
.
date
.
today
()
-
datetime
.
timedelta
(
days
=
365
),
)
.
exclude
(
pk__in
=
current_sponsors
.
values_list
(
"
pk
"
,
flat
=
True
))
)
context
=
{
"
sponsors_20kplus
"
:
sponsors_20kplus
,
"
sponsors_10kplus
"
:
sponsors_10kplus
,
"
sponsors_5kplus
"
:
sponsors_5kplus
,
"
current_sponsors
"
:
current_sponsors
.
order_by_total_amount_received
(),
"
last_year_sponsors
"
:
last_year_sponsors
.
order_by_total_amount_received
(),
}
return
render
(
request
,
"
sponsors/sponsors.html
"
,
context
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment