diff --git a/pinaxcon/monkey_patch.py b/pinaxcon/monkey_patch.py index a9d99258..fa66128c 100644 --- a/pinaxcon/monkey_patch.py +++ b/pinaxcon/monkey_patch.py @@ -13,6 +13,7 @@ class MonkeyPatchMiddleware(object): def do_monkey_patch(): patch_speaker_profile_form() patch_accounts_to_send_bcc() + fix_sitetree_check_access_500s() # Remove this function from existence global do_monkey_patch diff --git a/pinaxcon/templates/_form_snippet.html b/pinaxcon/templates/_form_snippet.html index cb97f820..f8ca2d80 100644 --- a/pinaxcon/templates/_form_snippet.html +++ b/pinaxcon/templates/_form_snippet.html @@ -1,5 +1,10 @@ {% load lca2017_tags %} +{% if form.non_field_errors %} + {{ form.non_field_errors }} +
+{% endif %} + {% for field in form %} {% if not field.is_hidden %}
diff --git a/pinaxcon/templates/account/login.html b/pinaxcon/templates/account/login.html index 14276fa4..79e749c1 100644 --- a/pinaxcon/templates/account/login.html +++ b/pinaxcon/templates/account/login.html @@ -14,6 +14,10 @@ {% trans "Don't have an account?" %} {% trans "Sign up" %}

{% endif %} +

+ {% trans "Accounts from previous years have not been carried over to this site." %} + {% trans "You will need to create a new account for this year's site." %} +

{% csrf_token %} diff --git a/pinaxcon/templates/symposion/proposals/_proposal_fields.html b/pinaxcon/templates/symposion/proposals/_proposal_fields.html index 9c94a2c8..8ec66c8b 100644 --- a/pinaxcon/templates/symposion/proposals/_proposal_fields.html +++ b/pinaxcon/templates/symposion/proposals/_proposal_fields.html @@ -1,8 +1,12 @@ {% load i18n %} +{% load lca2017_tags %}

{% trans "Submitted by" %}

{{ proposal.speaker }}

+

{% trans "Proposal Type" %}

+

{{ proposal.kind.name|capfirst }}

+

{% trans "Target Audience" %}

{{ proposal.get_target_audience_display }} 

@@ -40,14 +44,48 @@

{% trans "Special Requirements" %}

{{ proposal.technical_requirements_html|safe }}
-

{% trans "Speaker Bio" %}

-
{{ proposal.speaker.biography_html|safe }} 
+ {% for speaker in proposal.speakers %} +

{% trans "Speaker:" %} {{ speaker.name }}

+
{% trans "Biography" %}
-

{% trans "Speaker Experience" %}

-
{{ proposal.speaker.experience_html|safe }} 
+
{{ proposal.speaker.biography_html|safe }} 
+ +
{% trans "Experience" %}
+
{{ proposal.speaker.experience_html|safe }} 
+ {% endfor %} + + {% if can_manage_proposal or request.user.speaker_profile in proposal.speakers %} + +

{% trans "Assistance required?" %}

+
+ + + + + + + {% for speaker in proposal.speakers %} + + + + + + {% endfor %} +
{% trans "Travel" %}{% trans "Accommodation" %}
{{ speaker.name }}{{ speaker.travel_assistance }}{{ speaker.accommodation_assistance }}
+
+ + {% if proposal.speaker.accessibility_html %} +

{% trans "Speaker Accessibility Requirements" %}

+ {% for speaker in proposal.speakers %} + {% if speaker.accessibility_html %} +
{{ speaker.name }}
+
{{ speaker.accessibility_html|safe }} 
+ {% endif %} + {% endfor %} + {% endif %} + + {% endif %} -

{% trans "Speaker Accessibility Requirements" %}

-
{{ proposal.speaker.accessibility_html|safe }} 

{% trans "Documents" %}

diff --git a/pinaxcon/templatetags/lca2017_tags.py b/pinaxcon/templatetags/lca2017_tags.py index 9c10b496..8861666d 100644 --- a/pinaxcon/templatetags/lca2017_tags.py +++ b/pinaxcon/templatetags/lca2017_tags.py @@ -4,3 +4,16 @@ register = template.Library() @register.assignment_tag() def classname(ob): return ob.__class__.__name__ + +@register.simple_tag(takes_context=True) +def can_manage(context, proposal): + return proposal_permission(context, "manage", proposal) + +@register.simple_tag(takes_context=True) +def can_review(context, proposal): + return proposal_permission(context, "review", proposal) + +def proposal_permission(context, permname, proposal): + slug = proposal.kind.section.slug + perm = "reviews.can_%s_%s" % (permname, slug) + return context.request.user.has_perm(perm) diff --git a/static/src/lca2017/css/app.css b/static/src/lca2017/css/app.css index 29d8a89f..df428cd9 100644 --- a/static/src/lca2017/css/app.css +++ b/static/src/lca2017/css/app.css @@ -1375,7 +1375,7 @@ table.alt tr:not(:last-of-type) { @media (min-width: 48em) { .l-header { - margin-top: 6.25rem; + /*margin-top: 6.25rem; /* issue #44. We don't like this. */ } .l-header--menu-opener { display: none !important; @@ -1430,7 +1430,7 @@ table.alt tr:not(:last-of-type) { -ms-flex-direction: column; flex-direction: column; margin-top: 100px; - margin-top: 6.25rem; + margin-top: 3.25rem; padding: 50px 40px; padding: 3.125rem 40px; width: 100%; @@ -1466,7 +1466,8 @@ table.alt tr:not(:last-of-type) { @media (min-width: 48em) { .l-footer { - padding: 6.25rem 70px; + /*padding: 6.25rem 70px; /* issue #44 too much padding */ + padding: 3.25rem 70px; -ms-flex-direction: row; flex-direction: row; -ms-flex-pack: justify; @@ -1479,13 +1480,15 @@ table.alt tr:not(:last-of-type) { @media (min-width: 64em) { .l-footer { - padding: 6.25rem 160px; + /*padding: 6.25rem 160px; */ + padding: 3.25rem 160px; } } @media (min-width: 80em) { .l-footer { - padding: 6.25rem 200px; + /*padding: 6.25rem 200px;*/ + padding: 3.25rem 200px; } .l-footer--logo { margin-bottom: 0; @@ -1496,7 +1499,8 @@ table.alt tr:not(:last-of-type) { @media (min-width: 1946px) { .l-footer { - padding: 6.25rem auto; + padding: 3.25rem auto; + /*padding: 6.25rem auto;*/ } }