Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
TO
Maják
Commits
e6c75645
Commit
e6c75645
authored
4 years ago
by
jarmil
Browse files
Options
Downloads
Patches
Plain Diff
Oprava zobrazeni osoby odpovidajici novemu modelu
parent
1bbf21c0
No related branches found
No related tags found
2 merge requests
!173
Release
,
!134
Weby pro MS
Pipeline
#2062
passed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
shared/models.py
+7
-0
7 additions, 0 deletions
shared/models.py
shared/templates/shared/person_badge_snippet.html
+9
-9
9 additions, 9 deletions
shared/templates/shared/person_badge_snippet.html
with
16 additions
and
9 deletions
shared/models.py
+
7
−
0
View file @
e6c75645
...
@@ -176,6 +176,13 @@ class PersonPage(SharedSubpageMixin, MetadataPageMixin, Page):
...
@@ -176,6 +176,13 @@ class PersonPage(SharedSubpageMixin, MetadataPageMixin, Page):
class
Meta
:
class
Meta
:
verbose_name
=
"
Člověk
"
# to zni hrde
verbose_name
=
"
Člověk
"
# to zni hrde
@property
def
pageperex
(
self
):
"""
Vraci perex Pirata nejblizzsi lokalnimu kontextu.
Zamerne jiny nazev, aby v template bylo na vyber z x.perex, x.person.perex a x.pageperex
"""
return
self
.
perex
or
self
.
person
.
perex
def
get_context
(
self
,
request
):
def
get_context
(
self
,
request
):
context
=
super
().
get_context
(
request
)
context
=
super
().
get_context
(
request
)
# Na strance detailu cloveka se vpravo zobrazuji 3 dalsi nahodne profily
# Na strance detailu cloveka se vpravo zobrazuji 3 dalsi nahodne profily
...
...
This diff is collapsed.
Click to expand it.
shared/templates/shared/person_badge_snippet.html
+
9
−
9
View file @
e6c75645
...
@@ -2,31 +2,31 @@
...
@@ -2,31 +2,31 @@
<div
class=
"badge "
>
<div
class=
"badge "
>
<a
href=
"{{ person.url }}"
class=
"avatar badge__avatar avatar--sm"
>
<a
href=
"{{ person.url }}"
class=
"avatar badge__avatar avatar--sm"
>
<img
src=
"{{ person.portrait }}"
alt=
"{{ person.name }}"
/>
<img
src=
"{{ person.
person.
portrait }}"
alt=
"{{
person.
person.name }}"
/>
</a>
</a>
<div
class=
"badge__body"
>
<div
class=
"badge__body"
>
<h2
class=
"head-heavy-xs badge__title"
>
<h2
class=
"head-heavy-xs badge__title"
>
<a
href=
"{{ person.url }}"
title=
"{{ person.name }}"
class=
"content-block--nostyle"
>
<a
href=
"{{ person.url }}"
title=
"{{
person.
person.name }}"
class=
"content-block--nostyle"
>
{{ person.name }}
{{
person.
person.name }}
</a>
</a>
</h2>
</h2>
<p
class=
"badge__occupation"
>
<p
class=
"badge__occupation"
>
{% if title %}
{% if title %}
{{ title }}
{{ title }}
{% else %}
{% else %}
{{ person.perex|linebreaksbr }}
{{ person.
page
perex|linebreaksbr }}
{% endif %}
{% endif %}
</p>
</p>
{% if not skipcontacts %}
{% if not skipcontacts %}
{% if person.phone %}
{% if person.
person.
phone %}
<a
href=
"tel:person.phone"
class=
"contact-line icon-link content-block--nostyle contact-line--responsive badge__link"
>
<a
href=
"tel:person.
person.
phone"
class=
"contact-line icon-link content-block--nostyle contact-line--responsive badge__link"
>
<i
class=
"ico--phone"
></i>
<i
class=
"ico--phone"
></i>
<span>
{{ person.phone }}
</span>
<span>
{{ person.
person.
phone }}
</span>
</a>
</a>
{% endif %}
{% endif %}
<a
href=
"mailto:{{person.email}}"
class=
"contact-line icon-link content-block--nostyle contact-line--responsive badge__link"
>
<a
href=
"mailto:{{person.
person.
email}}"
class=
"contact-line icon-link content-block--nostyle contact-line--responsive badge__link"
>
<i
class=
"ico--envelope"
></i><span>
{{person.email}}
</span>
<i
class=
"ico--envelope"
></i><span>
{{person.
person.
email}}
</span>
</a>
</a>
{% endif %}
{% endif %}
...
...
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