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
a9d5bc2e
Commit
a9d5bc2e
authored
2 years ago
by
Daniel Kriz
Browse files
Options
Downloads
Patches
Plain Diff
[FIX]
Meta => icons,labels
parent
1dd6a84b
Branches
Branches containing commit
No related tags found
3 merge requests
!607
Pirati.cz
,
!588
[FIX]17-meta-pro-bloky
,
!575
Feature/pirati cz
Pipeline
#9402
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/blocks.py
+55
-5
55 additions, 5 deletions
main/blocks.py
with
55 additions
and
5 deletions
main/blocks.py
+
55
−
5
View file @
a9d5bc2e
...
...
@@ -15,11 +15,19 @@ class CTAMixin(StructBlock):
button_link
=
URLBlock
(
label
=
"
Odkaz tlačítka
"
)
button_text
=
CharBlock
(
label
=
"
Text tlačítka
"
)
class
Meta
:
icon
=
"
doc-empty
"
label
=
"
Výzva s odkazem
"
template
=
"
main/blocks/article_quote_block.html
"
class
BoxBlock
(
CTAMixin
,
StructBlock
):
image
=
ImageChooserBlock
(
label
=
"
Logo/obrázek
"
)
title
=
CharBlock
(
label
=
"
Nadpis
"
)
class
Meta
:
icon
=
"
form
"
label
=
"
Box
"
class
BoxesBlock
(
StructBlock
):
title
=
CharBlock
(
label
=
"
Nadpis
"
)
...
...
@@ -27,6 +35,8 @@ class BoxesBlock(StructBlock):
class
Meta
:
template
=
"
main/blocks/boxes_block.html
"
icon
=
"
grip
"
label
=
"
Skupina boxů
"
class
HomePageCarouseSlideBlock
(
CTAMixin
,
StructBlock
):
...
...
@@ -34,12 +44,18 @@ class HomePageCarouseSlideBlock(CTAMixin, StructBlock):
line_1
=
CharBlock
(
label
=
"
První řádek
"
)
line_2
=
CharBlock
(
label
=
"
Druhý řádek
"
)
class
Meta
:
icon
=
"
form
"
label
=
"
Stránka carouselu
"
class
HomePageCarouselBlock
(
StructBlock
):
slides
=
ListBlock
(
HomePageCarouseSlideBlock
,
label
=
"
Obrázky s nadpisy - carouselu
"
)
class
Meta
:
template
=
"
main/blocks/homepage_carousel_block.html
"
icon
=
"
folder-open-1
"
label
=
"
Carousel s obrázky
"
class
NewsBlock
(
StructBlock
):
...
...
@@ -50,6 +66,8 @@ class NewsBlock(StructBlock):
class
Meta
:
template
=
"
main/blocks/news_block.html
"
icon
=
"
doc-full-inverse
"
label
=
"
Novinky
"
class
PeopleGroupBlock
(
StructBlock
):
...
...
@@ -64,6 +82,10 @@ class PeopleGroupBlock(StructBlock):
label
=
"
Skupina osob
"
,
)
# class Meta:
# icon = "code"
# label = "Slug skupiny"
def
get_prep_value
(
self
,
value
):
value
=
super
().
get_prep_value
(
value
)
value
[
"
slug
"
]
=
slugify
(
value
[
"
title
"
])
...
...
@@ -75,6 +97,8 @@ class PeopleOverviewBlock(StructBlock): # TODO asi jako BoxesBlock
class
Meta
:
template
=
"
main/blocks/people_overview_block.html
"
icon
=
"
group
"
label
=
"
Skupina osob
"
class
ProgramBlock
(
StructBlock
):
...
...
@@ -82,11 +106,19 @@ class ProgramBlock(StructBlock):
title
=
CharBlock
(
label
=
"
Titulek článku programu
"
)
text
=
TextBlock
(
label
=
"
Obsah
"
)
class
Meta
:
icon
=
"
date
"
label
=
"
Program
"
class
ProgramGroupBlock
(
StructBlock
):
title
=
CharBlock
(
label
=
"
Titulek části programu
"
)
point_list
=
ListBlock
(
ProgramBlock
(),
label
=
"
Jednotlivé články programu
"
)
class
Meta
:
icon
=
"
date
"
label
=
"
Skupina programů
"
class
RegionsBlock
(
StructBlock
):
title
=
CharBlock
(
...
...
@@ -96,17 +128,19 @@ class RegionsBlock(StructBlock):
class
Meta
:
template
=
"
main/blocks/regions_block.html
"
icon
=
"
view
"
label
=
"
Články pro regiony
"
class
TweetsBlock
(
StructBlock
):
title
=
CharBlock
(
label
=
"
Titulek
"
,
help_text
=
"
Tweety budou načteny pro všchny profily uvedené v nastavení webu automaticky
"
,
help_text
=
"
Tweety budou načteny pro vš
e
chny profily uvedené v nastavení webu automaticky
"
,
)
class
Meta
:
template
=
"
main/blocks/twitter_block.html
"
icon
=
"
openquote
"
label
=
"
Tweety
"
class
PersonContactBlock
(
StructBlock
):
position
=
CharBlock
(
label
=
"
Název pozice
"
,
required
=
False
)
...
...
@@ -125,23 +159,39 @@ class PersonContactBoxBlock(CTAMixin, StructBlock):
title
=
CharBlock
(
label
=
"
Titulek
"
)
subtitle
=
CharBlock
(
label
=
"
Podtitulek
"
)
class
Meta
:
icon
=
"
mail
"
label
=
"
Kontakty
"
# Footer
class
LinkBlock
(
StructBlock
):
text
=
CharBlock
(
label
=
"
Titul
k
ek odkazu (text, který se zobrazí místo dlouhého odkazu)
"
label
=
"
Titulek odkazu (text, který se zobrazí místo dlouhého odkazu)
"
)
link
=
URLBlock
(
label
=
"
Odkaz
"
)
class
Meta
:
icon
=
"
link
"
label
=
"
Odkaz
"
class
OtherLinksBlock
(
StructBlock
):
title
=
CharBlock
(
label
=
"
Titulek
"
)
list
=
ListBlock
(
LinkBlock
,
label
=
"
Seznam odkazů s titulkem
"
)
class
Meta
:
icon
=
"
link
"
label
=
"
Ostatní odkazy
"
template
=
"
main/blocks/article_quote_block.html
"
class
SocialLinkBlock
(
LinkBlock
):
icon
=
CharBlock
(
label
=
"
Ikona
"
)
# TODO CSS class name or somthing better?
class
Meta
:
icon
=
"
link
"
label
=
"
Odkaz
"
# ARTICLE BLOCKS
class
ArticleQuoteBlock
(
StructBlock
):
...
...
@@ -160,7 +210,7 @@ class ArticleImageBlock(StructBlock):
text
=
CharBlock
(
label
=
"
Text
"
)
class
Meta
:
icon
=
"
user
"
icon
=
"
image
"
label
=
"
Obrázek s textem a odkazem
"
template
=
"
main/blocks/article_image_block.html
"
...
...
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