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
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
2ee17b37
Commit
2ee17b37
authored
Jul 20, 2018
by
Hugo LEVY-FALK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Passage par flags plutôt que par valeurs
parent
fa6614ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
cotisations/templates/cotisations/aff_cotisations.html
cotisations/templates/cotisations/aff_cotisations.html
+1
-1
logs/templatetags/logs_extra.py
logs/templatetags/logs_extra.py
+10
-2
templates/buttons/history.html
templates/buttons/history.html
+2
-2
users/templates/users/profil.html
users/templates/users/profil.html
+1
-1
No files found.
cotisations/templates/cotisations/aff_cotisations.html
View file @
2ee17b37
...
...
@@ -87,7 +87,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</li>
{% acl_end %}
<li>
{% history_button facture text=
'History' html_class=''
%}
{% history_button facture text=
True html_class=False
%}
</li>
</ul>
</div>
...
...
logs/templatetags/logs_extra.py
View file @
2ee17b37
...
...
@@ -36,8 +36,16 @@ def classname(obj):
@
register
.
inclusion_tag
(
'buttons/history.html'
)
def
history_button
(
instance
,
text
=
None
,
html_class
=
None
):
"""Creates the correct history button for an instance."""
def
history_button
(
instance
,
text
=
False
,
html_class
=
True
):
"""Creates the correct history button for an instance.
Args:
instance: The instance of which you want to get history buttons.
text: Flag stating if a 'History' text should be displayed.
html_class: Flag stating if the link should have the html classes
allowing it to be displayed as a button.
"""
return
{
'application'
:
instance
.
_meta
.
app_label
,
'name'
:
instance
.
_meta
.
model_name
,
...
...
templates/buttons/history.html
View file @
2ee17b37
...
...
@@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
{% load i18n %}
<a
class=
"{{ class |default_if_none:"
btn
btn-info
btn-sm
"}}"
role=
"button"
title=
"Historique"
href=
"{% url 'logs:history' application name id %}"
>
<i
class=
"fa fa-history"
></i>
{% if text %}{% trans text
%}{% endif %}
<a
{%
if
class
%}
class=
"btn btn-info btn-sm"
{%
endif
%}
role=
"button"
title=
"Historique"
href=
"{% url 'logs:history' application name id %}"
>
<i
class=
"fa fa-history"
></i>
{% if text %}{% trans 'History'
%}{% endif %}
</a>
users/templates/users/profil.html
View file @
2ee17b37
...
...
@@ -71,7 +71,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Gérer les groupes
</a>
{% acl_end %}
{% history_button users text=
"History"
%}
{% history_button users text=
True
%}
</ul>
</div>
<div
class=
"panel-body"
>
...
...
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