Moving some menus around.
This commit is contained in:
parent
35f22bdb71
commit
2864593b00
|
@ -2,22 +2,30 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
{% with url_name=request.resolver_match.url_name proposal_urls="proposal_list,speakerproposal_create,speakerproposal_detail,speakerproposal_update,speakerproposal_submit,speakerproposal_picture,eventproposal_create,eventproposal_detail,eventproposal_update,eventproposal_submit" %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="btn-group btn-group-justified hidden-xs">
|
<div class="btn-group btn-group-justified hidden-xs">
|
||||||
<a href="{% url 'schedule_index' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "schedule_index" or urlyear %}btn-primary{% else %}btn-default{% endif %}">Schedule</a>
|
<a href="{% url 'schedule_index' camp_slug=camp.slug %}" class="btn {% if url_name == "schedule_index" or urlyear %}btn-primary{% else %}btn-default{% endif %}">Schedule</a>
|
||||||
<a href="{% url 'event_index' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "event_index" %}btn-primary{% else %}btn-default{% endif %}">Events</a>
|
<a href="{% url 'event_index' camp_slug=camp.slug %}" class="btn {% if url_name == "event_index" %}btn-primary{% else %}btn-default{% endif %}">Events</a>
|
||||||
<a href="{% url 'speaker_index' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "speaker_index" %}btn-primary{% else %}btn-default{% endif %}">Speakers</a>
|
<a href="{% url 'speaker_index' camp_slug=camp.slug %}" class="btn {% if url_name == "speaker_index" %}btn-primary{% else %}btn-default{% endif %}">Speakers</a>
|
||||||
<a href="{% url 'call_for_speakers' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "call_for_speakers" %}btn-primary{% else %}btn-default{% endif %}"><span {% if not camp.call_for_speakers_open %}style="text-decoration: line-through;"{% endif %}>Call for Speakers</span></a>
|
{% if request.user.is_authenticated %}
|
||||||
|
<a href="{% url 'proposal_list' camp_slug=camp.slug %}" class="btn {% if url_name in proposal_urls %}btn-primary{% else %}btn-default{% endif %}">Your Proposals</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group-vertical visible-xs">
|
<div class="btn-group-vertical visible-xs">
|
||||||
<a href="{% url 'schedule_index' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "schedule_index" or urlyear %}btn-primary{% else %}btn-default{% endif %}">Schedule</a>
|
<a href="{% url 'schedule_index' camp_slug=camp.slug %}" class="btn {% if url_name == "schedule_index" or urlyear %}btn-primary{% else %}btn-default{% endif %}">Schedule</a>
|
||||||
<a href="{% url 'event_index' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "event_index" %}btn-primary{% else %}btn-default{% endif %}">Events</a>
|
<a href="{% url 'event_index' camp_slug=camp.slug %}" class="btn {% if url_name == "event_index" %}btn-primary{% else %}btn-default{% endif %}">Events</a>
|
||||||
<a href="{% url 'speaker_index' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "speaker_index" %}btn-primary{% else %}btn-default{% endif %}">Speakers</a>
|
<a href="{% url 'speaker_index' camp_slug=camp.slug %}" class="btn {% if url_name == "speaker_index" %}btn-primary{% else %}btn-default{% endif %}">Speakers</a>
|
||||||
<a href="{% url 'call_for_speakers' camp_slug=camp.slug %}" class="btn {% if request.resolver_match.url_name == "call_for_speakers" %}btn-primary{% else %}btn-default{% endif %}"><span {% if not camp.call_for_speakers_open %}style="text-decoration: line-through;"{% endif %}>Call for Speakers</span></a>
|
{% if request.user.is_authenticated %}
|
||||||
|
<a href="{% url 'proposal_list' camp_slug=camp.slug %}" class="btn {% if url_name in proposal_urls %}btn-primary{% else %}btn-default{% endif %}">Your Proposals</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
{% block program_content %}
|
{% block program_content %}
|
||||||
{% endblock program_content %}
|
{% endblock program_content %}
|
||||||
|
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -38,11 +38,6 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% if request.user.is_authenticated %}
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<a href="{% url 'proposal_list' camp_slug=camp.slug %}" class="btn btn-default pull-right">Manage Proposals</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
event anchors at BornHack 2016.
|
event anchors at BornHack 2016.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<a href="{% url 'call_for_speakers' camp_slug=camp.slug %}" class="btn btn-primary"><span {% if not camp.call_for_speakers_open %}style="text-decoration: line-through;"{% endif %}>"Call for Speakers" for {{ camp.title }}</span></a>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{% for speaker in speaker_list %}
|
{% for speaker in speaker_list %}
|
||||||
<a href="{% url 'speaker_detail' camp_slug=camp.slug slug=speaker.slug %}" class="list-group-item">
|
<a href="{% url 'speaker_detail' camp_slug=camp.slug slug=speaker.slug %}" class="list-group-item">
|
||||||
|
|
|
@ -61,7 +61,7 @@ class SpeakerProposalUpdateView(LoginRequiredMixin, CampViewMixin, EnsureUserOwn
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
if form.instance.proposal_status == models.UserSubmittedModel.PROPOSAL_PENDING:
|
if form.instance.proposal_status == models.UserSubmittedModel.PROPOSAL_PENDING:
|
||||||
messages.info(self.request, "Your speaker proposal has been reverted to status draft. Please submit it again when you are ready.")
|
messages.warning(self.request, "Your speaker proposal has been reverted to status draft. Please submit it again when you are ready.")
|
||||||
form.instance.proposal_status = models.UserSubmittedModel.PROPOSAL_DRAFT
|
form.instance.proposal_status = models.UserSubmittedModel.PROPOSAL_DRAFT
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ class EventProposalUpdateView(LoginRequiredMixin, CampViewMixin, EnsureUserOwnsP
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
if form.instance.proposal_status == models.UserSubmittedModel.PROPOSAL_PENDING:
|
if form.instance.proposal_status == models.UserSubmittedModel.PROPOSAL_PENDING:
|
||||||
messages.info(self.request, "Your event proposal has been reverted to status draft. Please submit it again when you are ready.")
|
messages.warning(self.request, "Your event proposal has been reverted to status draft. Please submit it again when you are ready.")
|
||||||
form.instance.proposal_status = models.UserSubmittedModel.PROPOSAL_DRAFT
|
form.instance.proposal_status = models.UserSubmittedModel.PROPOSAL_DRAFT
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
|
@ -85,10 +85,7 @@
|
||||||
<a class="btn {% menubuttonclass 'villages' %}" href="{% url 'village_list' camp_slug=camp.slug %}">Villages</a>
|
<a class="btn {% menubuttonclass 'villages' %}" href="{% url 'village_list' camp_slug=camp.slug %}">Villages</a>
|
||||||
<a class="btn {% menubuttonclass 'program' %}" href="{% url 'schedule_index' camp_slug=camp.slug %}">Program</a>
|
<a class="btn {% menubuttonclass 'program' %}" href="{% url 'schedule_index' camp_slug=camp.slug %}">Program</a>
|
||||||
<a class="btn {% menubuttonclass 'sponsors' %}" href="{% url 'sponsors' camp_slug=camp.slug %}">Sponsors</a>
|
<a class="btn {% menubuttonclass 'sponsors' %}" href="{% url 'sponsors' camp_slug=camp.slug %}">Sponsors</a>
|
||||||
{% if not camp.read_only %}
|
<a class="btn {% menubuttonclass 'teams' %}" href="{% url 'team_list' camp_slug=camp.slug %}">Teams</a>
|
||||||
<a class="btn {% menubuttonclass 'teams' %}"
|
|
||||||
href="{% url 'team_list' camp_slug=camp.slug %}">Teams</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group-vertical visible-xs">
|
<div class="btn-group-vertical visible-xs">
|
||||||
<a class="btn {% menubuttonclass 'camps' %}" href="{% url 'camp_detail' camp_slug=camp.slug %}">{{ camp.title }}</a>
|
<a class="btn {% menubuttonclass 'camps' %}" href="{% url 'camp_detail' camp_slug=camp.slug %}">{{ camp.title }}</a>
|
||||||
|
@ -96,10 +93,7 @@
|
||||||
<a class="btn {% menubuttonclass 'villages' %}" href="{% url 'village_list' camp_slug=camp.slug %}">Villages</a>
|
<a class="btn {% menubuttonclass 'villages' %}" href="{% url 'village_list' camp_slug=camp.slug %}">Villages</a>
|
||||||
<a class="btn {% menubuttonclass 'program' %}" href="{% url 'schedule_index' camp_slug=camp.slug %}">Program</a>
|
<a class="btn {% menubuttonclass 'program' %}" href="{% url 'schedule_index' camp_slug=camp.slug %}">Program</a>
|
||||||
<a class="btn {% menubuttonclass 'sponsors' %}" href="{% url 'sponsors' camp_slug=camp.slug %}">Sponsors</a>
|
<a class="btn {% menubuttonclass 'sponsors' %}" href="{% url 'sponsors' camp_slug=camp.slug %}">Sponsors</a>
|
||||||
{% if not camp.read_only %}
|
<a class="btn {% menubuttonclass 'teams' %}" href="{% url 'team_list' camp_slug=camp.slug %}">Teams</a>
|
||||||
<a class="btn {% menubuttonclass 'teams' %}"
|
|
||||||
href="{% url 'team_list' camp_slug=camp.slug %}">Teams</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue