Skip to content

Commit

Permalink
[#1231] Removed unnecessary template tag
Browse files Browse the repository at this point in the history
  • Loading branch information
vaszig committed Mar 23, 2023
1 parent 9c64c4c commit 39c85e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>
<div class="dropdown__item">
{% if plan %}
{% get_action_history_url action=action plan=plan as action_history_url %}
{% url 'plans:plan_action_history' plan_uuid=plan.uuid uuid=action.uuid as action_history_url %}
{% button icon="history" text=_("History") href=action_history_url uuid=action.uuid icon_outlined=True transparent=True %}
{% else %}
{% button icon="history" text=_("History") href="accounts:action_history" uuid=action.uuid icon_outlined=True transparent=True %}
Expand Down
18 changes: 0 additions & 18 deletions src/open_inwoner/components/templatetags/action_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,6 @@ def get_action_delete_url(action, plan=None):
return reverse("accounts:action_delete", kwargs={"uuid": action.uuid})


@register.simple_tag()
def get_action_history_url(action, plan):
"""
Generates the correct action history url for plans.
Usage:
{% get_action_history_url action=action plan=plan %}
Variables:
+ action: Action | The action the url should be generated from.
+ plan: Plan | The plan the action history url should be generated for.
"""
return reverse(
"plans:plan_action_history",
kwargs={"plan_uuid": plan.uuid, "uuid": action.uuid},
)


@register.filter()
def is_connected(action, user):
"""
Expand Down

0 comments on commit 39c85e8

Please sign in to comment.