hide buttons that modify stuff when CFP is not open or camp is readonly
This commit is contained in:
parent
183da3d161
commit
3d100c2f8a
|
@ -3,13 +3,21 @@
|
|||
|
||||
{% block program_content %}
|
||||
|
||||
{% if not camp.call_for_participation_open %}
|
||||
<div class="alert alert-danger">
|
||||
<strong>Note!</strong> This Call for Particilation is not open.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ eventproposal.title }} Details</h2>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ eventproposal.title }}</div>
|
||||
<div class="panel-body">
|
||||
{{ eventproposal.abstract|commonmark }}
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
<a href="{% url 'program:eventproposal_update' camp_slug=camp.slug pk=eventproposal.uuid %}" class="btn btn-primary btn-sm pull-right"><i class="fas fa-edit"></i><span class="h5"> Modify</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel-footer">Status: <span class="badge">{{ eventproposal.proposal_status }}</span> ID: <span class="badge">{{ eventproposal.uuid }}</span></div>
|
||||
</div>
|
||||
|
@ -22,7 +30,9 @@
|
|||
{% else %}
|
||||
<i>Nothing found.</i>
|
||||
{% endif %}
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
<a href="{% url 'program:eventproposalurl_create' camp_slug=camp.slug event_uuid=eventproposal.uuid %}" class="btn btn-success btn-sm pull-right"><i class="fas fa-plus"></i><span class="h5"> Add URL</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -34,17 +44,21 @@
|
|||
{% else %}
|
||||
<i>Nothing found.</i>
|
||||
{% endif %}
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
{% if eventproposal.get_available_speakerproposals.exists %}
|
||||
<a href="{% url 'program:eventproposal_selectperson' camp_slug=camp.slug event_uuid=eventproposal.uuid %}" class="btn btn-success pull-right"><i class="fas fa-plus"></i><span class="h5"> Add {{ eventproposal.event_type.host_title }}</span></a>
|
||||
{% else %}
|
||||
<a href="{% url 'program:speakerproposal_create' camp_slug=camp.slug event_uuid=eventproposal.uuid %}" class="btn btn-success pull-right"><i class="fas fa-plus"></i><span class="h5"> Add {{ eventproposal.event_type.host_title }}</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="{% url 'program:proposal_list' camp_slug=camp.slug %}" class="btn btn-primary">Back to List</a>
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
<a href="{% url 'program:eventproposal_delete' camp_slug=camp.slug pk=eventproposal.uuid %}" class="btn btn-danger pull-right"><i class="fas fa-times"></i><span class="h5"> Delete</span></a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% endblock program_content %}
|
||||
|
|
|
@ -3,13 +3,21 @@
|
|||
|
||||
{% block program_content %}
|
||||
|
||||
{% if not camp.call_for_participation_open %}
|
||||
<div class="alert alert-danger">
|
||||
<strong>Note!</strong> This Call for Particilation is not open.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ speakerproposal.name }} Details</h2>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ speakerproposal.name }}</div>
|
||||
<div class="panel-body">
|
||||
{{ speakerproposal.biography|commonmark }}
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
<a href="{% url 'program:speakerproposal_update' camp_slug=camp.slug pk=speakerproposal.uuid %}" class="btn btn-primary btn-sm pull-right"><i class="fas fa-edit"></i><span class="h5"> Modify</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel-footer">Status: <span class="badge">{{ speakerproposal.proposal_status }}</span> | ID: <span class="badge">{{ speakerproposal.uuid }}</span></div>
|
||||
</div>
|
||||
|
@ -22,7 +30,9 @@
|
|||
{% else %}
|
||||
<i>Nothing found.</i>
|
||||
{% endif %}
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
<a href="{% url 'program:speakerproposalurl_create' camp_slug=camp.slug speaker_uuid=speakerproposal.uuid %}" class="btn btn-success btn-sm pull-right"><i class="fas fa-plus"></i><span class="h5"> Add URL</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -34,15 +44,19 @@
|
|||
{% else %}
|
||||
<i>Nothing found.</i>
|
||||
{% endif %}
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
<a href="{% url 'program:eventproposal_typeselect' camp_slug=camp.slug speaker_uuid=speakerproposal.uuid %}" class="btn btn-success btn-sm pull-right"><i class="fas fa-plus"></i><span class="h5"> Add New Event</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="{% url 'program:proposal_list' camp_slug=camp.slug %}" class="btn btn-primary">Back to List</a>
|
||||
{% if camp.call_for_participation_open and not camp.read_only %}
|
||||
{% if not speakerproposal.eventproposals.all %}
|
||||
<a href="{% url 'program:speakerproposal_delete' camp_slug=camp.slug pk=speakerproposal.uuid %}" class="btn btn-danger pull-right"><i class="fas fa-times"></i><span class="h5"> Delete Person</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% endblock program_content %}
|
||||
|
|
Loading…
Reference in a new issue