Skip to content

Commit

Permalink
[QCDP24-31] removed close datarequest button
Browse files Browse the repository at this point in the history
  • Loading branch information
awset committed Sep 8, 2024
1 parent 37b21a6 commit 9ed3e8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
3 changes: 2 additions & 1 deletion ckanext/datarequests/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def delete_datarequest(context, data_dict):


def close_datarequest(context, data_dict):
return auth_if_creator(context, data_dict, constants.SHOW_DATAREQUEST)
# Close data request feature is removed in this project.
return {'success': False}


def comment_datarequest(context, data_dict):
Expand Down
16 changes: 0 additions & 16 deletions ckanext/datarequests/templates/datarequests/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
{% link_for _('Manage'), named_route='datarequest.update', id=datarequest_id, class_='btn btn-default', icon='wrench' %}
{% endif %}

{% if h.check_access('close_datarequest', {'id':datarequest_id }) and not c.datarequest.closed %}
{% link_for _('Close'), named_route='datarequest.close', id=datarequest_id, class_='btn btn-danger', icon='lock' %}
{% endif %}

{% endblock %}

{% block content_primary_nav %}
Expand All @@ -39,18 +35,6 @@
{% endblock %}

{% block primary_content_inner %}
{% if c.datarequest.closed %}
<span class="uppercase label label-closed pull-right">
<i class="icon-lock fa fa-lock"></i>
{{ _('Closed') }}
</span>
{% else %}
<span class="uppercase label label-open pull-right">
<i class="icon-unlock fa fa-unlock"></i>
{{ _('Open') }}
</span>
{% endif %}

<h1 class="{% block page_heading_class %}page-heading{% endblock %}">{% block page_heading %}{{ c.datarequest.get('title') }}{% endblock %}</h1>

{% block datarequest_description %}
Expand Down

0 comments on commit 9ed3e8d

Please sign in to comment.