Skip to content

Commit

Permalink
Merge pull request ckan#8654 from qld-gov-au/github-8651-htmx-snippet
Browse files Browse the repository at this point in the history
refactor user Follow button to use snippet, ckan#8651
  • Loading branch information
wardi authored Feb 7, 2025
2 parents 8ccfabe + 657d5b3 commit 38dd990
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ckan/templates/user/snippets/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ <h1 class="heading">{{ user.display_name }}</h1>
{% if error_message %}
<div class="alert alert-danger">{{ error_message }}</div>
{% endif %}
{% if am_following %}
<a class="btn btn-danger" hx-post="{{ h.url_for('user.unfollow', id=user.id) }}" hx-target="#user-info"><i class="fa-solid fa-circle-minus"></i> Unfollow</a>
{% else %}
<a class="btn btn-success" hx-post="{{ h.url_for('user.follow', id=user.id) }}" hx-target="#user-info"><i class="fa-solid fa-circle-plus"></i> Follow</a>
{% endif %}
{% snippet 'snippets/follow_button.html', am_following=am_following, obj_type='user', obj_id=user.id %}
{% endif %}
{% endblock %}
{% endif %}
Expand Down

0 comments on commit 38dd990

Please sign in to comment.