Skip to content

Commit 207e52d

Browse files
authored
Merge branch 'master' into private-slides
2 parents 7120ad5 + c968452 commit 207e52d

7 files changed

Lines changed: 44 additions & 3 deletions

File tree

junction/proposals/forms.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ class ProposalForm(forms.Form):
141141
required=False,
142142
help_text="Say something about yourself, work etc...",
143143
)
144+
is_first_time_speaker = forms.BooleanField(
145+
label="First Time Speaker",
146+
required=False,
147+
help_text="Please mark, if you are a first time speaker for any conference or meetup,"
148+
"not just for PyCon India",
149+
)
144150
speaker_links = forms.CharField(
145151
label="Speaker Links",
146152
widget=PagedownWidget(show_preview=True),
@@ -171,6 +177,7 @@ def populate_form_for_update(self, proposal):
171177
"private_content_urls": proposal.private_content_urls,
172178
"speaker_info": proposal.speaker_info,
173179
"speaker_links": proposal.speaker_links,
180+
"is_first_time_speaker": proposal.is_first_time_speaker,
174181
"status": proposal.status,
175182
"proposal_section": proposal.proposal_section.pk,
176183
"proposal_type": proposal.proposal_type.pk,
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.9 on 2020-07-07 03:14
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations, models
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
("proposals", "0028_auto_20200617_2337"),
12+
]
13+
14+
operations = [
15+
migrations.AddField(
16+
model_name="historicalproposal",
17+
name="is_first_time_speaker",
18+
field=models.BooleanField(default=False),
19+
),
20+
migrations.AddField(
21+
model_name="proposal",
22+
name="is_first_time_speaker",
23+
field=models.BooleanField(default=False),
24+
),
25+
]

junction/proposals/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class Proposal(TimeAuditModel):
111111
)
112112
speaker_info = models.TextField(blank=True, default="")
113113
speaker_links = models.TextField(blank=True, default="")
114+
is_first_time_speaker = models.BooleanField(blank=True, default=False)
114115
status = models.PositiveSmallIntegerField(
115116
choices=ProposalStatus.CHOICES, default=ProposalStatus.DRAFT
116117
)

junction/proposals/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def create_proposal(request, conference_slug):
174174
private_content_urls=form.cleaned_data["private_content_urls"],
175175
speaker_info=form.cleaned_data["speaker_info"],
176176
speaker_links=form.cleaned_data["speaker_links"],
177+
is_first_time_speaker=form.cleaned_data["is_first_time_speaker"],
177178
status=form.cleaned_data["status"],
178179
proposal_type_id=form.cleaned_data["proposal_type"],
179180
proposal_section_id=form.cleaned_data["proposal_section"],
@@ -326,6 +327,7 @@ def update_proposal(request, conference_slug, slug):
326327
proposal.private_content_urls = form.cleaned_data["private_content_urls"]
327328
proposal.speaker_info = form.cleaned_data["speaker_info"]
328329
proposal.speaker_links = form.cleaned_data["speaker_links"]
330+
proposal.is_first_time_speaker = form.cleaned_data["is_first_time_speaker"]
329331
proposal.status = form.cleaned_data["status"]
330332
proposal.proposal_type_id = form.cleaned_data["proposal_type"]
331333
proposal.proposal_section_id = form.cleaned_data["proposal_section"]

junction/templates/profiles/dashboard.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
{% block breadcrumbs %}
1919
{{ block.super }}
20-
{% breadcrumb "Dashboard" "user-proposals-list" %}
20+
<!-- breadcrumb takes 2 mandatory arguments (label & viewname) -->
21+
{% breadcrumb "Dashboard" "dummy-url" %}
2122
{% endblock %}
2223

2324
{% block navbar_logo %}

junction/templates/profiles/userprofile.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717

1818
{% block breadcrumbs %}
1919
{{ block.super }}
20-
{% breadcrumb "Dashboard" "user-proposals-list" %}
21-
{% breadcrumb "Profile" "user-profile"%}
20+
<!-- breadcrumb takes 2 mandatory arguments (label & viewname) -->
21+
{% breadcrumb "Dashboard" "/profiles" %}
22+
{% breadcrumb "Profile" "dummy-url" %}
2223
{% endblock %}
2324

2425
{% block navbar_logo %}

junction/templates/proposals/detail/base.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ <h1 class="proposal-title">
7979
</div>
8080
{% endif %}
8181

82+
{% if is_author or is_reviewer or user.is_superuser and proposal.is_first_time_speaker %}
83+
<span class="label label-info">First Time Speaker</span>
84+
{% endif %}
85+
8286
{% comment %}
8387
{% if is_reviewer %}
8488
<a class="tag label label-proposal-type" href="{{ proposal.get_review_url }}">Review proposal</a>

0 commit comments

Comments
 (0)