Add detail view for speaker and event proposals.
This commit is contained in:
parent
b172d678fa
commit
c8ab0230cd
|
@ -41,6 +41,9 @@ Proposals | {{ block.super }}
|
|||
</td>
|
||||
<td><span class="badge">{{ speakerproposal.proposal_status }}</span></td>
|
||||
<td class="text-right">
|
||||
<a href="{% url 'program:speakerproposal_detail' camp_slug=camp.slug pk=speakerproposal.uuid %}"
|
||||
class="btn btn-primary btn-sm">
|
||||
<i class="fas fa-eye"></i><span class="h5"> Detail</span></a>
|
||||
{% if not camp.read_only %}
|
||||
<a href="{% url 'program:speakerproposal_update' camp_slug=camp.slug pk=speakerproposal.uuid %}" class="btn btn-primary btn-sm"><i class="fas fa-edit"></i><span class="h5"> Modify</span></a>
|
||||
<a href="{% url 'program:eventproposal_typeselect' camp_slug=camp.slug speaker_uuid=speakerproposal.uuid %}" class="btn btn-success btn-sm" data-toggle="tooltip" title="Click to add a new talk/act/event for '{{ speakerproposal.name }}'"><i class="fas fa-plus"></i><span class="h5"> Add Event</span></a>
|
||||
|
@ -81,6 +84,9 @@ Proposals | {{ block.super }}
|
|||
<td><span class="h4">{{ eventproposal.track.name }}</span></td>
|
||||
<td><span class="badge">{{ eventproposal.proposal_status }}</span></td>
|
||||
<td class='text-right'>
|
||||
<a href="{% url 'program:eventproposal_detail' camp_slug=camp.slug pk=eventproposal.uuid %}"
|
||||
class="btn btn-primary btn-sm">
|
||||
<i class="fas fa-eye"></i><span class="h5"> Detail</span></a>
|
||||
{% if not camp.read_only %}
|
||||
<a href="{% url 'program:eventproposal_update' camp_slug=camp.slug pk=eventproposal.uuid %}" class="btn btn-primary btn-sm"><i class="fas fa-edit"></i><span class="h5"> Modify</span></a>
|
||||
{% if eventproposal.get_available_speakerproposals.exists %}
|
||||
|
|
|
@ -43,6 +43,11 @@ urlpatterns = [
|
|||
),
|
||||
url(
|
||||
r'^people/', include([
|
||||
url(
|
||||
r'^(?P<pk>[a-f0-9-]+)/$',
|
||||
SpeakerProposalDetailView.as_view(),
|
||||
name='speakerproposal_detail'
|
||||
),
|
||||
url(
|
||||
r'^(?P<pk>[a-f0-9-]+)/update/$',
|
||||
SpeakerProposalUpdateView.as_view(),
|
||||
|
@ -67,6 +72,11 @@ urlpatterns = [
|
|||
),
|
||||
url(
|
||||
r'^events/', include([
|
||||
url(
|
||||
r'^(?P<pk>[a-f0-9-]+)/$',
|
||||
EventProposalDetailView.as_view(),
|
||||
name='eventproposal_detail'
|
||||
),
|
||||
url(
|
||||
r'^(?P<pk>[a-f0-9-]+)/edit/$',
|
||||
EventProposalUpdateView.as_view(),
|
||||
|
|
|
@ -202,6 +202,12 @@ class SpeakerProposalDeleteView(LoginRequiredMixin, CampViewMixin, EnsureWritabl
|
|||
return reverse('program:proposal_list', kwargs={'camp_slug': self.camp.slug})
|
||||
|
||||
|
||||
|
||||
class SpeakerProposalDetailView(LoginRequiredMixin, CampViewMixin, EnsureWritableCampMixin, EnsureUserOwnsProposalMixin, EnsureCFPOpenMixin, DetailView):
|
||||
model = models.SpeakerProposal
|
||||
template_name = 'speakerproposal_detail.html'
|
||||
|
||||
|
||||
###################################################################################################
|
||||
# eventproposal views
|
||||
|
||||
|
@ -370,6 +376,10 @@ class EventProposalDeleteView(LoginRequiredMixin, CampViewMixin, EnsureWritableC
|
|||
return reverse('program:proposal_list', kwargs={'camp_slug': self.camp.slug})
|
||||
|
||||
|
||||
class EventProposalDetailView(LoginRequiredMixin, CampViewMixin, EnsureWritableCampMixin, EnsureUserOwnsProposalMixin, EnsureCFPOpenMixin, DetailView):
|
||||
model = models.EventProposal
|
||||
template_name = 'eventproposal_detail.html'
|
||||
|
||||
###################################################################################################
|
||||
# combined proposal views
|
||||
|
||||
|
|
Loading…
Reference in a new issue