Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
f118cb3b
Commit
f118cb3b
authored
4 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Document templatetags
parent
18a4f0bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!333
Documentation for beta release (Documentation for first release part 1)
Pipeline
#3081
failed
4 years ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/core/templatetags/html_helpers.py
+5
-1
5 additions, 1 deletion
aleksis/core/templatetags/html_helpers.py
docs/ref/core/12_template_tags.rst
+22
-0
22 additions, 0 deletions
docs/ref/core/12_template_tags.rst
with
27 additions
and
1 deletion
aleksis/core/templatetags/html_helpers.py
+
5
−
1
View file @
f118cb3b
...
...
@@ -9,7 +9,11 @@ register = template.Library()
def
add_class_to_el
(
value
:
str
,
arg
:
str
)
->
str
:
"""
Add a CSS class to every occurence of an element type.
Example: {{ mymodel.myhtmlfield|add_class_to_el:
"
ul,browser-default
"
:Example:
.. code-block:: jinja2
{{ mymodel.myhtmlfield|add_class_to_el:
"
ul,browser-default
"
}}
"""
el
,
cls
=
arg
.
split
(
"
,
"
)
soup
=
BeautifulSoup
(
value
,
"
html.parser
"
)
...
...
This diff is collapsed.
Click to expand it.
docs/ref/core/12_template_tags.rst
0 → 100644
+
22
−
0
View file @
f118cb3b
Template tags
=============
AlekSIS provides some templatetags to display data in templates.
Dashboard
---------
.. automodule:: aleksis.core.templatetags.dashboard
:members:
Data helpers
------------
.. automodule:: aleksis.core.templatetags.data_helpers
:members:
HTML helpers
------------
.. automodule:: aleksis.core.templatetags.html_helpers
:members:
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