Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
concrexit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
70
Issues
70
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
thalia
concrexit
Commits
c9995018
Verified
Commit
c9995018
authored
Jun 20, 2019
by
Sébastiaan Versteeg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add local partner to partners page
parent
0e38b50a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
17 deletions
+37
-17
website/partners/locale/nl/LC_MESSAGES/django.mo
website/partners/locale/nl/LC_MESSAGES/django.mo
+0
-0
website/partners/locale/nl/LC_MESSAGES/django.po
website/partners/locale/nl/LC_MESSAGES/django.po
+9
-5
website/partners/templates/partners/index.html
website/partners/templates/partners/index.html
+20
-4
website/partners/views.py
website/partners/views.py
+8
-8
No files found.
website/partners/locale/nl/LC_MESSAGES/django.mo
View file @
c9995018
This diff was suppressed by a .gitattributes entry.
website/partners/locale/nl/LC_MESSAGES/django.po
View file @
c9995018
...
...
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-
07 14:29
+0200\n"
"PO-Revision-Date: 2019-06-
07 15:04
+0200\n"
"POT-Creation-Date: 2019-06-
20 16:40
+0200\n"
"PO-Revision-Date: 2019-06-
20 16:41
+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
...
...
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.
1
\n"
"X-Generator: Poedit 2.2.
3
\n"
#: apps.py templates/partners/index.html templates/partners/partner.html
msgid "Partners"
...
...
@@ -128,14 +128,18 @@ msgstr ""
"\">samenwerking@thalia.nu</a>."
#: templates/partners/index.html
msgid "
Main P
artner"
msgstr "
H
oofdpartner"
msgid "
our main p
artner"
msgstr "
onze h
oofdpartner"
#: templates/partners/index.html templates/partners/partner.html
#: templates/partners/vacancies.html templates/partners/vacancy_card.html
msgid "Learn more"
msgstr "Lees meer"
#: templates/partners/index.html
msgid "our local partner"
msgstr "onze localpartner"
#: templates/partners/partner.html
msgid "Address"
msgstr "Adres"
...
...
website/partners/templates/partners/index.html
View file @
c9995018
...
...
@@ -21,15 +21,31 @@
</p>
<div
class=
"row mt-4"
>
<div
class=
"col-12 col-md-4 d-flex align-items-center"
>
<div
class=
"col-12 col-md-6"
>
<div
class=
"text-center"
>
<img
src=
"{% thumbnail main_partner.logo THUMBNAIL_SIZE_MEDIUM fit=False %}"
/>
</div>
<div
class=
"
col-12 col-md-8 mt-3 mt-md-0
"
>
<h2>
{% trans "
Main Partner"
%}
</h2>
<div
class=
"
mt-3
"
>
<h2>
{% trans "
our main partner"|capfirst
%}
</h2>
<h3>
{{ main_partner.name }}
</h3>
<p>
{{ main_partner.company_profile|striptags|bleach|truncatechars:425 }}
</p>
<a
href=
"{{ main_partner.get_absolute_url }}"
class=
"btn btn-
second
ary"
>
{% trans "Learn more" %}
</a>
<a
href=
"{{ main_partner.get_absolute_url }}"
class=
"btn btn-
prim
ary"
>
{% trans "Learn more" %}
</a>
</div>
</div>
<div
class=
"col-12 col-md-6"
>
<div
class=
"text-center"
>
<img
src=
"{% thumbnail local_partner.logo THUMBNAIL_SIZE_MEDIUM fit=False %}"
/>
</div>
<div
class=
"mt-3"
>
<h2>
{% trans "our local partner"|capfirst %}
</h2>
<h3>
{{ local_partner.name }}
</h3>
<p>
{{ local_partner.company_profile|striptags|bleach|truncatechars:425 }}
</p>
<a
href=
"{{ local_partner.get_absolute_url }}"
class=
"btn btn-primary"
>
{% trans "Learn more" %}
</a>
</div>
</div>
</div>
<div
class=
"row mt-4"
>
</div>
<div
class=
"row mt-4"
>
...
...
website/partners/views.py
View file @
c9995018
...
...
@@ -8,17 +8,17 @@ from partners.models import Partner, Vacancy, VacancyCategory
def
index
(
request
):
"""View to show overview page of partners."""
partners
=
Partner
.
objects
.
filter
(
is_active
=
True
,
is_main_partner
=
False
)
try
:
main_partner
=
Partner
.
objects
.
get
(
is_active
=
True
,
is_main_partner
=
True
)
except
Partner
.
DoesNotExist
:
main_partner
=
None
partners
=
Partner
.
objects
.
filter
(
is_active
=
True
,
is_main_partner
=
False
,
is_local_partner
=
False
)
main_partner
=
Partner
.
objects
.
filter
(
is_main_partner
=
True
).
first
()
local_partner
=
Partner
.
objects
.
filter
(
is_local_partner
=
True
).
first
()
context
=
{
'main_partner'
:
main_partner
,
'local_partner'
:
local_partner
,
'partners'
:
sorted
(
partners
,
key
=
lambda
x
:
random
()),
}
return
render
(
request
,
'partners/index.html'
,
context
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment