Changeset - 1886323d7431
[Not reviewed]
1 41 7
Sachi King - 7 years ago 2017-04-16 06:30:45
nakato@nakato.io
Bootstrapification

Boot custom CSS, and put some base, standard css in its place.
Shame I did not start with fresh Bootstrap4, but oh well.

Some more templates could be made to make this less messy, which would
be good.
49 files changed with 490 insertions and 549 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
 
import os
 
import saml2
 
import saml2.saml
 
from django.utils.crypto import get_random_string
 
import django
 

	
 
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
 
PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
 
DJANGO_ROOT = os.path.abspath(os.path.dirname(django.__file__))
 
BASE_DIR = PACKAGE_ROOT
 

	
 

	
 
### USER SETTINGS
 

	
 
DEBUG = True
 
DATABASES = {
 
    "default": {
 
        "ENGINE": "django.db.backends.sqlite3",
 
        "NAME": os.path.join(PROJECT_ROOT, "dev.db"),
 
    }
 
}
 
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
 
THEME_CONTACT_EMAIL = "team@lca2018.org"
 
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", get_random_string(length=64))
 

	
 

	
 
PINAX_STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "your test public key")
 
PINAX_STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "your test secret key")
 
PINAX_STRIPE_SEND_EMAIL_RECEIPTS = False
 

	
 
saml2_entityid = 'http://example.com/saml2/metadata/'
 
saml2_sp_name = 'Federated Django sample SP'
 
saml2_sp_assertion_service = 'http://example.com/saml2/acs/'
 
saml2_sp_slo_rdir = 'http://example.com/saml2/ls/'
 
smal2_sp_slo_post = 'http://example.com/saml2/ls/post'
 
saml2_base_dir = os.path.join(PACKAGE_ROOT, 'saml2')
 
saml2_idp_metadata = {
 
    'local': [os.path.join(saml2_base_dir, 'remote_metadata.xml')],
 
    },
 
    }
 
saml2_signing_key = os.path.join(saml2_base_dir, 'cert.key')
 
saml2_signing_crt = os.path.join(saml2_base_dir, 'cert.pem')
 
saml2_encr_key = os.path.join(saml2_base_dir, 'enc.key')
 
saml2_encr_crt = os.path.join(saml2_base_dir, 'enc.crt')
 
saml2_contact = [
 
    {'given_name': os.environ.get("META_GIVEN_NAME", 'Bastard'),
 
     'sur_name': os.environ.get('META_FAM_NAME', 'Operator'),
 
     'company': os.environ.get('META_COMPANY', 'Corp1'),
 
     'email_address': os.environ.get('META_EMAIL', 'op@example.com'),
 
     'contact_type': 'technical'},
 
    ],
 

	
 

	
 
### Standard settings
 

	
 
CACHES = {
 
    'default': {
 
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
 
    }
 
}
 

	
 

	
 
ALLOWED_HOSTS = ['lca2018.org', '127.0.0.1', 'localhost']
 

	
 
TIME_ZONE = "Australia/Sydney"
 
DATE_FORMAT = "j F Y"
 
LANGUAGE_CODE = "en-au"
 

	
 
SITE_ID = int(os.environ.get("SITE_ID", 1))
 
USE_I18N = True
 
USE_L10N = True
 
USE_TZ = True
 

	
 
MEDIA_ROOT = os.path.join(PACKAGE_ROOT, "site_media", "media")
 
MEDIA_URL = "/site_media/media/"
 

	
 
STATIC_ROOT = os.path.join(PROJECT_ROOT, "static", "distx")
 
STATIC_ROOT = os.path.join(PROJECT_ROOT, "static")
 
STATIC_URL = "/static/dist/"
 

	
 
STATICFILES_DIRS = [
 
    os.path.join(PROJECT_ROOT, "static", "dist"),
 
]
 

	
 
STATICFILES_FINDERS = [
 
    "django.contrib.staticfiles.finders.FileSystemFinder",
 
    "django.contrib.staticfiles.finders.AppDirectoriesFinder",
 
]
 

	
 
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
 
TEMPLATES = [
 
    {
 
        "BACKEND": "django.template.backends.django.DjangoTemplates",
 
        "DIRS": [
 
            os.path.join(PACKAGE_ROOT, "templates"),
 
            os.path.join(DJANGO_ROOT, 'forms/templates')
 
        ],
 
        "APP_DIRS": True,
 
        "OPTIONS": {
 
            "debug": DEBUG,
 
            "context_processors": [
 
                "django.contrib.auth.context_processors.auth",
 
                "django.template.context_processors.debug",
 
                "django.template.context_processors.i18n",
 
                "django.template.context_processors.media",
 
                "django.template.context_processors.static",
 
                "django.template.context_processors.tz",
 
                "django.template.context_processors.request",
 
                "django.contrib.messages.context_processors.messages",
 
                "pinax_theme_bootstrap.context_processors.theme",
 
                "symposion.reviews.context_processors.reviews",
 
            ],
 
        },
 
    },
 
]
 

	
 
MIDDLEWARE_CLASSES = [
 
    "django.contrib.sessions.middleware.SessionMiddleware",
 
    "django.middleware.common.CommonMiddleware",
 
    "django.middleware.csrf.CsrfViewMiddleware",
 
    "django.contrib.auth.middleware.AuthenticationMiddleware",
 
    "django.contrib.auth.middleware.SessionAuthenticationMiddleware",
 
    "django.contrib.messages.middleware.MessageMiddleware",
 
    "debug_toolbar.middleware.DebugToolbarMiddleware",
 
    "reversion.middleware.RevisionMiddleware",
 
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
 
    'pinaxcon.monkey_patch.MonkeyPatchMiddleware',
 
]
pinaxcon/templates/_form_snippet.html
Show inline comments
 
{% load pyconau2017_tags %}
 
{% if form.non_field_errors %}
 
  <div class="has-errors">
 
    {{ form.non_field_errors }}
 
  </div>
 
  <br/>
 
{% endif %}
 

	
 
<blockquote><small>
 
  Fields marked with <strong>(*)</strong> are required.
 
</small></blockquote>
 
<blockquote>
 
  Fields marked with <strong>*</strong> are required.
 
</blockquote>
 

	
 
{% include "forms/render.html" with form=form %}
pinaxcon/templates/dashboard.html
Show inline comments
 
{% extends "utility_page.html" %}
 
{% load staticfiles %}
 
{% load i18n %}
 
{% load proposal_tags %}
 
{% load review_tags %}
 
{% load teams_tags %}
 
{% load registrasion_tags %}
 
{% load pyconau2017_tags %}
 
{% load staticfiles %}
 

	
 

	
 
{% block head_title %}Dashboard{% endblock %}
 
{% block header_title %}Dashboard{% endblock %}
 

	
 

	
 
{% block content %}
 

	
 
<div class="jumbotron">
 
<h1>DASHBOARD</h1>
 
{% available_categories as categories %}
 
{% if categories %}
 
  <!--div class="panel panel__compact panel__bg panel__last" -->
 
    <div class="dashbpard-panel">
 
      <div>
 
        <h3>{% trans "Attend" %} {% conference_name %}</h3>
 
        <div class="vertical-bigger"></div>
 
        <div class="btn-group">
 
          {% if not user.attendee.completed_registration %}
 
            <a href="{% url "guided_registration" %}" class="btn btn__neut">
 
              Get your ticket
 
            </a>
 
          {% else %}
 
            <a href="{% url "attendee_edit" %}" class="btn btn__neut">
 
              Edit attendee profile
 
            </a>
 
<div>
 
  {% available_categories as categories %}
 
  {% if categories %}
 

	
 
            {% items_pending as pending %}
 
            {% if pending %}
 
              <a href="{% url "checkout" %}" class="btn btn__neut">
 
                Check out and pay
 
              </a>
 
            {% endif %}
 
          {% endif %}
 

	
 
          {% if user.is_staff %}
 
            <a class="btn btn__neut" href="{% url "reports_list" %}">Reports</a>
 
          {% endif %}
 
    {% if user.is_staff %}
 
    <div class="container">
 
      <div class="page-header">
 
        <h1>Administration</h1>
 
      </div>
 
      <div class="page-row">
 
        <div class="col-xs-12">
 
          <a class="btn btn-lg btn-info" role="button" href="{% url "reports_list" %}">Reports</a>
 
        </div>
 
      </div>
 
    </div>
 
  <!--/div-->
 
    {% endif %}
 

	
 
  <div class="dashboard-panel">
 
      {% if not user.attendee.completed_registration %}
 
        <p>To attend the conference, you must purchase a ticket. <a href="{% url "guided_registration" %}">Use our registration form to purchase your ticket</a>.
 
        </p>
 

	
 
  <div class="container">
 
    <div class="page-header">
 
      <h1>{% trans "Attend" %} {% conference_name %}</h1>
 
    </div>
 
    <div class="page-row">
 
      {% if not user.attendee.completed_registration %}
 
        <div class="panel panel-default">
 
          <div class="panel-heading">
 
            <h4>Register</h4>
 
          </div>
 
          <div class="panel-body">
 
            <p>To attend the conference, you must register an attendee profile and purchase your ticket</p>
 
            <a class="btn btn-lg btn-primary" role="button" href="{% url "guided_registration" %}">Get your ticket</a>
 
          </div>
 
        </div>
 
      {% else %}
 

	
 
        <h3 class="small">Your items</h3>
 
          {% items_pending as pending %}
 

	
 
          {% if pending %}
 
            <h4>Items pending payment</h4>
 
            {% include "registrasion/_items_list.html" with items=pending %}
 
            <p><a href="{% url "checkout" %}" class="btn btn-xs btn-default">
 
              <i class="fa fa-credit-card"></i>
 
              Check out and pay for these items.</a>
 
            </p>
 
          {% endif %}
 

	
 
          {% items_purchased as purchased %}
 
          {% if purchased %}
 
            <h4>Paid items</h4>
 
            {% include "registrasion/_items_list.html" with items=purchased %}
 
          {% endif %}
 

	
 
          <h4>Add/Update items</h4>
 
          {% include "registrasion/_category_list.html" with categories=categories %}
 

	
 
        {% invoices as invoices %}
 
        {% if invoices %}
 
          <h4>Invoices</h4>
 
          <ul>
 
            {% for invoice in invoices %}
 
              {% if invoice.is_void %}
 
                <li class="void-invoice" style="display: none;">
 
              {% else %}
 
                <li>
 
              {% endif %}
 
                <a href="{% url "invoice" invoice.id %}" >Invoice {{ invoice.id }}</a>
 
                - ${{ invoice.value }} ({{ invoice.get_status_display }})
 
              </li>
 
            {% endfor %}
 
          </ul>
 
          <p>
 
            <button class="btn" id="toggle-void-invoices" href="" onclick="toggleVoidInvoices();">Show void invoices</button>
 
          </p>
 
        {% endif %}
 

	
 
        {% available_credit as credit %}
 
        {% if credit %}
 
          <p>You have ${{ credit }} leftover from refunded invoices. This credit will be automatically applied to new invoices. Contact the conference organisers to
 
          for a refund to your original payment source.</p>
 
        <div class="col-xs-12 col-sm-6 col-lg-6">
 
          <div class="panel panel-default">
 
            <div class="panel-heading">
 
              <h4>Attendee Profile</h4>
 
            </div>
 
            <div class="panel-body">
 
              <p>If you would like to change the details on your badge or your attendee statistics, you may edit your attendee profile up until the weekend before the conference</p>
 
              <a class="btn btn-lg btn-primary pull-right" role="button" href="{% url "attendee_edit" %}">Edit attendee profile</a>
 
            </div>
 
          </div>
 
        </div>
 
        {% items_pending as pending %}
 
        {% if pending %}
 
          <div class="col-xs-12 col-sm-12 col-lg-12">
 
            <div class="panel panel-default">
 
              <div class="panel-heading">
 
                <h4>Account</h4>
 
              </div>
 
              <div class="panel-body">
 
                {% items_pending as pending %}
 
                {% if pending %}
 
                  <div class="col-xs-12 col-sm-6 col-lg-6">
 
                    <div class="panel panel-warning">
 
                      <div class="panel-heading">
 
                        <h5>Items pending payment</h5>
 
                      </div>
 
                      <div class="panel-body">
 
                        {% include "registrasion/_items_list.html" with items=pending %}
 
                        <div class="right">
 
                          <a class="btn btn-lg btn-success pull-right" role="button" href="{% url "checkout" %}">Check out and pay</a>
 
                        </div>
 
                      </div>
 
                    </div>
 
                  </div>
 
                {% endif %}
 

	
 
                {% items_purchased as purchased %}
 
                {% if purchased %}
 
                  <div class="col-xs-12 col-sm-6 col-lg-6">
 
                    <div class="panel panel-success">
 
                      <div class="panel-heading">
 
                        <h5>Paid Items</h5>
 
                      </div>
 
                      <div class="panel-body">
 
                        {% include "registrasion/_items_list.html" with items=purchased %}
 
                      </div>
 
                    </div>
 
                  </div>
 
                {% endif %}
 
                <div class="col-xs-12 col-sm-6 col-lg-6">
 
                  <div class="panel panel-success">
 
                    <div class="panel-heading">
 
                      <h5>Add/Update Items</h5>
 
                    </div>
 
                    <div class="panel-body">
 
                      {% include "registrasion/_category_list.html" with categories=categories %}
 
                    </div>
 
                  </div>
 
                </div>
 

	
 
                {% invoices as invoices %}
 
                {% if invoices %}
 
                  <div class="col-xs-12 col-sm-12 col-lg-12">
 
                    <div class="panel panel-info">
 
                      <div class="panel-heading">
 
                        <h5>Invoices</h5>
 
                      </div>
 
                      <div class="panel-body">
 
                        <ul>
 
                          {% for invoice in invoices %}
 
                            {% if invoice.is_void %}
 
                              <li class="void-invoice" style="display: none;">
 
                            {% else %}
 
                              <li>
 
                            {% endif %}
 
                              <a href="{% url "invoice" invoice.id %}" >Invoice {{ invoice.id }}</a>
 
                              - ${{ invoice.value }} ({{ invoice.get_status_display }})
 
                              <button class="btn btn-lg btn-default" type="button" id="toggle-void-invoices" href="" onclick="toggleVoidInvoices();">Show void invoices</button>
 
                            </li>
 
                          {% endfor %}
 
                        </ul>
 
                      </div>
 
                    </div>
 
                  </div>
 
                {% endif %}
 

	
 
                {% available_credit as credit %}
 
                {% if credit %}
 
                  <div class="col-xs-12 col-sm-12 col-lg-12">
 
                    <div class="panel panel-danger">
 
                      <div class="panel-heading">
 
                        <h5>Credit</h5>
 
                      </div>
 
                      <div class="panel-body">
 
                        <p>You have ${{ credit }} leftover from refunded invoices. This credit will be automatically applied to new invoices. Contact the conference organisers to for a refund to your original payment source.</p>
 
                      </div>
 
                    </div>
 
                  </div>
 
                {% endif %}
 

	
 
              </div>
 
            </div>
 
          </div>
 
        {% endif %}
 
      <p></p>
 
      {% endif %}
 
    </div>
 
  </div>
 

	
 
{% endif %}
 

	
 
    <div class="dashboard-panel">
 
      <div class="panel--2-3">
 
        <h3>{% trans "Speaking and Miniconfs" %}</h3>
 
        <br />
 
        <div class="btn-group">
 

	
 
<div class="container">
 
  <div class="page-header">
 
    <h1>{% trans "Speaking and Miniconfs" %}</h1>
 
  </div>
 
  <div class="page-row">
 
    <div class="col-xs-12 col-sm-6 col-lg-6">
 
      <div class="panel panel-primary">
 
        <div class="panel-heading">
 
          <h5>Speaker Profile</h5>
 
        </div>
 
        <div class="panel-body">
 
          {% if not user.speaker_profile %}
 
            <p>To create a speaking or miniconf proposal you must first create a speaker profile.</p>
 
          {% endif %}
 
          <p>Your speaker profile is independent of your attendee profile and the details you provide here will be used during selection and to populate your speaker bio on the conference website.</p>
 
          {% if not user.speaker_profile %}
 
            <a href="{% url "speaker_create" %}" class="btn btn__neut">
 
            Create profile
 
            </a>
 
            <a class="btn btn-lg btn-primary pull-right" role="button" href="{% url "speaker_create" %}">Create Profile</a>
 
          {% else %}
 
            <a href="{% url "speaker_edit" %}" class="btn btn__neut">
 
              Edit profile
 
            </a>
 
            <a href="{% url "proposal_submit" %}" class="btn btn__neut">
 
              New proposal
 
            </a>
 
            <a class="btn btn-lg btn-primary pull-right" role="button" href="{% url "speaker_edit" %}">Edit Profile</a>
 
          {% endif %}
 
        </div>
 
      </div>
 
  </div>
 

	
 
  <div class="dashboard-panel">
 
    </div>
 

	
 
      {% if not user.speaker_profile %}
 
        <p>To submit a proposal, you must first create a speaker profile.</p>
 
      {% else %}
 
        <h3>Your Proposals</h3>
 
    {% if user.speaker_profile %}
 
      <div class="col-xs-12 col-sm-6 col-lg-6">
 
        <div class="panel panel-primary">
 
          <div class="panel-heading">
 
            <h5>New Proposal</h5>
 
          </div>
 
          <div class="panel-body">
 
            <p>You may use the following form to create a speaking or miniconf proposal.</p>
 
            <p>Once submitted you will be able to see the status of your proposals, as well manage the submission and co-speakers from this page</p>
 
            <a class="btn btn-lg btn-primary pull-right" role="button" href="{% url "proposal_submit" %}">New Proposal</a>
 
          </div>
 
        </div>
 
      </div>
 
    {% endif %}
 

	
 
        {% if not user.speaker_profile.proposals.exists %}
 
          <p>No proposals submitted yet.</p>
 
        {% else %}
 
          <p></p>
 
        {% endif %}
 
  </div>
 
</div>
 

	
 
      {% endif %}
 

	
 
      {% if user.speaker_profile.proposals.exists %}
 
{% if user.speaker_profile %}
 
  {% if user.speaker_profile.proposals.exists %}
 
    <div class="container">
 
      <div class="page-header">
 
        <h2>Your Proposals</h2>
 
      </div>
 
      <div class="page-row">
 
        {% if user.speaker_profile.proposals.exists %}
 
          {% for proposal in user.speaker_profile.proposals.all %}
 
            {% include "symposion/proposals/_proposal_row.html" %}
 
          {% endfor %}
 
      {% endif %}
 

	
 
      {% if user.speaker_profile %}
 
          {% associated_proposals as associated_proposals %}
 
          {% if associated_proposals %}
 
            <h3 class="small">Proposals you have joined as an additional speaker</h3>
 
            <table>
 
                <tr>
 
                    <th>Title</th>
 
                    <th>Type</th>
 
                    <th>Status</th>
 
                    <th>Actions</th>
 
                </tr>
 
                {% for proposal in associated_proposals %}
 
                    {% include "symposion/proposals/_proposal_row.html" %}
 
                {% endfor %}
 
            </table>
 
          {% endif %}
 
        {% endif %}
 
      </div>
 
    </div>
 
  {% endif %}
 
{% endif %}
 

	
 
          {% pending_proposals as pending_proposals %}
 
          {% if pending_proposals %}
 
            <h3 class="small">Proposals you have been invited to join</h3>
 
              <table>
 
                <tr>
 
                  <th>Title</th>
 
                  <th>Type</th>
 
                  <th>Status</th>
 
                  <th>Actions</th>
 
                </tr>
 
                {% for proposal in pending_proposals %}
 
                  {% include "symposion/proposals/_pending_proposal_row.html" %}
 
                {% endfor %}
 
              </table>
 
          {% endif %}
 
      {% endif %}
 

	
 
</div>
 
{% if user.speaker_profile %}
 
  {% associated_proposals as associated_proposals %}
 
  {% pending_proposals as pending_proposals %}
 
  {% if associated_proposals or pending_proposals %}
 
    <div class="container">
 
      <div class="page-header">
 
        <h2>Copresenter Proposals</h2>
 
      </div>
 
      <div class="page-row">
 
      {% for proposal in associated_proposals %}
 
        {% include "symposion/proposals/_proposal_row.html" %}
 
      {% endfor %}
 
      {% for proposal in pending_proposals %}
 
        {% include "symposion/proposals/_pending_proposal_row.html" %}
 
      {% endfor %}
 
      </div>
 
    </div>
 
  {% endif %}
 
{% endif %}
 

	
 
{# {% include 'registrasion/dashboard-widget.html' %} #}
 

	
 
{% if review_sections %}
 

	
 
  <div class="dashboard-panel">
 
        <h3>{% trans "Reviews" %}</h3>
 

	
 
        {% for section in review_sections %}
 
          <h3 class="small">{{ section }}</h3>
 
          <ul>
 
            <li><a href="{% url "review_section" section.section.slug %}">All</a></li>
 
            <li><a href="{% url "user_reviewed" section.section.slug %}">Reviewed by you</a></li>
 
            <li><a href="{% url "user_not_reviewed" section.section.slug %}">Not Reviewed by you</a></li>
 
          </ul>
 
        {% endfor %}
 

	
 
  <div class="container">
 
    <div class="page-header">
 
      <h2>{% trans "Reviews" %}</h2>
 
    </div>
 

	
 
    <div class="page-row">
 
      {% for section in review_sections %}
 
        <div class="col-xs-12 col-sm-6 col-lg-6">
 
          <div class="panel panel-primary">
 
            <div class="panel-heading">
 
              <h5>{{ section }}</h5>
 
            </div>
 
            <div class="panel-body">
 
              <ul>
 
                <li><a href="{% url "review_section" section.section.slug %}">All</a></li>
 
                <li><a href="{% url "user_reviewed" section.section.slug %}">Reviewed by you</a></li>
 
                <li><a href="{% url "user_not_reviewed" section.section.slug %}">Not Reviewed by you</a></li>
 
              </ul>
 
            </div>
 
          </div>
 
        </div>
 
      {% endfor %}
 
    </div>
 
  </div>
 
{% endif %}
 

	
 

	
 
{% available_teams as available_teams %}
 
{% if user.memberships.exists or available_teams %}
 
  <div class="dashboard-panel">
 
      <h3>{% trans "Teams" %}</h3>
 

	
 
        {% if user.memberships.exists %}
 
          <h3 class="small">Your Teams</h3>
 
          <table>
 
            {% for membership in user.memberships.all %}
 
              <tr>
 
                <td>
 
                  <a href="{% url "team_detail" membership.team.slug %}">{{ membership.team.name }}</a>
 
                  {% if membership.team.description %}<br>{{ membership.team.description }}{% endif %}
 
                </td>
 
                <td>
 
  <div class="container">
 
    <div class="page-header">
 
      <h2>{% trans "Teams" %}</h2>
 
    </div>
 
  </div>
 
  <div class="container">
 
    <div class="page-row">
 
      {% if user.memberships.exists %}
 
        <div class="page-header">
 
          <h3>Your Teams</h3>
 
        </div>
 
        <div clas="page-row">
 
          {% for membership in user.memberships.all %}
 
            <div class="col-xs-12 col-sm-6 col-lg-6">
 
              <div class="panel panel-primary">
 
                <div class="panel-heading">
 
                  <h5>{{ membership.team.name }}</h5>
 
                </div>
 
                <div class="panel-body">
 
                  {% if membership.team.description %}<p>{{ membership.team.description }}</p>{% endif %}
 
                  <a class="btn btn-lg btn-primary" role="button" href="{% url "team_detail" membership.team.slug %}">Details</a>
 
                  <span class="{% if membership.state == 'invited' %} label-info{% endif %}">{{ membership.get_state_display }}</span>
 
                </td>
 
                <td>
 
                  {% if membership.state == "manager" or user.is_staff %}
 
                    {% if membership.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %}
 
                      {% endif %}
 
                </td>
 
              </tr>
 
            {% endfor %}
 
          </table>
 

	
 
        {% endif %}
 

	
 

	
 
        {% if available_teams %}
 
          <h3 class="small">Available Teams</h3>
 
          <table class="table table-striped">
 
            {% for team in available_teams %}
 
              <tr>              <td>
 
                  <a href="{% url "team_detail" team.slug %}">{{ team }}</a>
 
                  {% if team.description %}<br>{{ team.description }}{% endif %}
 
                </td>              <td>
 
                   <span class="label label-default">{{ team.get_access_display }}</span>
 
                </td>
 
              </tr>
 
            {% endfor %}
 
           </table>
 
        {% endif %}
 

	
 
                  {% endif %}
 
                </div>
 
              </div>
 
            </div>
 
          {% endfor %}
 
        </div>
 
      {% endif %}
 
    </div>
 
    <div class="container">
 
      {% if available_teams %}
 
        <div class="page-header">
 
          <h3>Available Teams</h3>
 
        </div>
 
        <div clas="page-row">
 
          {% for team in available_teams %}
 
            <div class="col-xs-12 col-sm-6 col-lg-6">
 
              <div class="panel panel-primary">
 
                <div class="panel-heading">
 
                  <h5>{{ team }}</h5>
 
                </div>
 
                <div class="panel-body">
 
                  {% if team.description %}<p>{{ team.description }}</p>{% endif %}
 
                  <span class="label label-default">{{ team.get_access_display }}</span>
 
                  <a class="btn btn-lg btn-primary" role="button" href="{% url "team_detail" team.slug %}">Details</a>
 
                </div>
 
          {% endfor %}
 
        </div>
 
      {% endif %}
 
    </div>
 
  </div>
 
{% endif %}
 
</div>
 

	
 
{% endblock %} <!-- block content -->
 

	
 
{% block scripts_extra %}
 
  <script type="text/javascript">
 
    function _toggleVoidInvoices() {
 
      var visible = false;
 
      function toggleVoidInvoices() {
 
        $btn = $("#toggle-void-invoices");
 
        $invoices = $(".void-invoice")
 

	
 
        if (visible) {
 
          $invoices.hide();
 
          btnText = "Show void invoices";
 
        } else {
 
          $invoices.show();
 
          btnText = "Hide void invoices";
 
        }
 
        $btn.text(btnText);
 
        visible = !visible;
 
        return true;
 
      }
 
      return toggleVoidInvoices;
 
    }
 
    var toggleVoidInvoices = _toggleVoidInvoices();
 
    _toggleVoidInvoices() = undefined;
 
  </script>
 
{% endblock %}  <!-- scripts_extra -->
pinaxcon/templates/django/forms/widgets/checkbox.html
Show inline comments
 
new file 100644
 
<input class="form-check-input" type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
pinaxcon/templates/django/forms/widgets/checkbox_option.html
Show inline comments
 
new file 100644
 
{% if wrap_label %}<label class="form-check-label"{% if widget.attrs.id %} for="{{ widget.attrs.id }}"{% endif %}>{% endif %}
 
<input class="form-check-input" type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
 
{% if wrap_label %} {{ widget.label }}</label>{% endif %}
pinaxcon/templates/django/forms/widgets/input.html
Show inline comments
 
new file 100644
 
<input class="form-control" type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
pinaxcon/templates/django/forms/widgets/radio_option.html
Show inline comments
 
new file 100644
 
{% if wrap_label %}<label class="form-check-label"{% if widget.attrs.id %} for="{{ widget.attrs.id }}"{% endif %}>{% endif %}
 
  <input class="form-check-input" type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
 
{% if wrap_label %} {{ widget.label }}</label>{% endif %}
pinaxcon/templates/django/forms/widgets/select.html
Show inline comments
 
new file 100644
 
<select class="form-control" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %}
 
  <optgroup label="{{ group_name }}">{% endif %}{% for option in group_choices %}
 
  {% include option.template_name with widget=option %}{% endfor %}{% if group_name %}
 
  </optgroup>{% endif %}{% endfor %}
 
</select>
pinaxcon/templates/django/forms/widgets/text.html
Show inline comments
 
new file 100644
 
<input class="form-control" type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
pinaxcon/templates/django/forms/widgets/textarea.html
Show inline comments
 
new file 100644
 
<textarea class="form-control" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
 
{% if widget.value %}{{ widget.value }}{% endif %}</textarea>
pinaxcon/templates/forms/render_fields.html
Show inline comments
 
{% for field in form %}
 
  {% if not field.is_hidden %}
 
    <div class="fieldWrapper {% if field.errors %}has-errors{% endif %}">
 
      <div>
 
        {% include "forms/widget.html" %}
 
      </div>
 

	
 
      {% if field.help_text %}
 
        <span class="help_text">{{ field.help_text|safe }}</span>
 
      {% endif %}
 
    </div>
 
    {% include "forms/widget.html" %}
 
  {% endif %}
 
{% endfor %}
pinaxcon/templates/forms/widget.html
Show inline comments
 
{% load pyconau2017_tags %}
 

	
 
{% classname field.field.widget as widget %}
 
{% if widget == "CheckboxInput" %}
 
  {% include "forms/widget_boolean_single.html" %}
 
{% elif widget == "RadioSelect" or widget == "CheckboxSelectMultiple" %}
 
  {% include "forms/widget_boolean_multiple.html" %}
 
{% elif widget == "Select" or widget == "SelectMultiple" or widget == "LazySelect" or widget == "CountrySelectWidget" %}
 
  {% include "forms/widget_basic.html" with widget_class="select" %}
 
{% else %}
 
  {% include "forms/widget_basic.html" %}
 
{% endif %}
 
<div class="form-group row">
 
  {% classname field.field.widget as widget %}
 
  {% if widget == "CheckboxInput" %}
 
    {% include "forms/widget_boolean_single.html" %}
 
  {% elif widget == "RadioSelect" or widget == "CheckboxSelectMultiple" %}
 
    {% include "forms/widget_boolean_multiple.html" %}
 
  {% elif widget == "Select" or widget == "SelectMultiple" or widget == "LazySelect" or widget == "CountrySelectWidget" %}
 
    {% include "forms/widget_basic.html" with widget_class="select" %}
 
  {% else %}
 
    {% include "forms/widget_basic.html" %}
 
  {% endif %}
 
</div>
pinaxcon/templates/forms/widget_basic.html
Show inline comments
 
<h4>
 
  <label for="{{ field.id_for_label }}">{{ field.label }}</label>
 
  {% if field.field.required %}
 
    (*)
 
  {% endif %}
 
</h4>
 
<label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}{% if field.field.required %} *{% endif %}</label>
 
{{ field.errors }}
 
<div class="form-field {{ widget_class }}">{{ field }}</div>
 
<div class="col-sm-10">
 
  {{ field }}
 
  {% if field.help_text %}
 
    <span class="help_text">{{ field.help_text|safe }}</span>
 
  {% endif %}
 
</div>
pinaxcon/templates/forms/widget_boolean_multiple.html
Show inline comments
 
<h4>
 
  {{ field.label }}
 
  {% if field.field.required %}
 
    (*)
 
  {% endif %}
 
</h4>
 
<ul class="form-field boolean-group">
 
  {% for item in field %}
 
    {% if True or widget == "CheckboxSelectMultiple" %}
 
      <li>
 
    {% else %}
 
      <!-- This is broken for everything. Going to need to look at Django. -->
 
      <li class="boolean-group--row">
 
    {% endif %}
 
      {{ item }}
 
      <label for="{{ item.id_for_label }}"><strong>{{ item.label }}</strong></label>
 
    </li>
 
  {% endfor %}
 
</ul>
 
{{ field.errors }}
 
<h3>
 
  {{ field.label }}{% if field.field.required %} *{% endif %}
 
  {{ field.errors }}
 
</h3>
 
{% if field.help_text %}
 
  <span class="help_text">{{ field.help_text|safe }}</span>
 
{% endif %}
 

	
 
{% for item in field %}
 
  <div class="col-sm-offset-2 col-sm-10">
 
    {{ item }}
 
  </div>
 
{% endfor%}
pinaxcon/templates/forms/widget_boolean_single.html
Show inline comments
 
<ul class="form-field boolean-group">
 
  <li class="boolean-group--row">
 
<h3>
 
  {{ field.label }}{% if field.field.required %} *{% endif %}
 
  {{ field.errors }}
 
</h3>
 
<div class="col-sm-offset-2 col-sm-10">
 
  <label class="form-check-label" for="id_profile-past_lca_0">
 
    {{ field }}
 
    <label for="{{ field.id_for_label }}">
 
      <strong>{{ field.label }}</strong>
 
      {% if field.field.required %}
 
        (*)
 
      {% endif %}
 
    </label>
 
  </li>
 
</ul>
 
{{ field.errors }}
 
    <p>Sign me up</p>
 
    {% if field.help_text %}
 
      <span class="help_text">{{ field.help_text|safe }}</span>
 
    {% endif %}
 
  </label>
 
</div>
pinaxcon/templates/registrasion/amend_registration.html
Show inline comments
 
{% extends "registrasion/base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 

	
 
{% block content %}
 

	
 
<h2>Item summary for {{ user.attendee.attendeeprofilebase.attendee_name }}
 
  (id={{user.id}})</h2>
 

	
 
<h3>Paid Items</h3>
 

	
 
<p>You cannot remove paid items from someone's registration. You must first
 
  cancel the invoice that added those items. You will need to re-add the items
 
  from that invoice for the user to have them available again.</p>
 

	
 
{% include "registrasion/_items_list.html" with items=paid %}
 

	
 
<br />
 

	
 
<h3>Cancelled Items</h3>
 

	
 
{% include "registrasion/_items_list.html" with items=cancelled %}
 

	
 
<br />
 

	
 
<h3>Amend pending items</h3>
 

	
 
<form method="POST">
 
<form class="form-horizontal" method="POST">
 
  {% csrf_token %}
 
  {% include "_form_snippet.html" with form=form %}
 
  <br/>
 
  <input class="btn" type="submit">
 
</form>
 

	
 
<br />
 

	
 
<h3>Generate invoice</h3>
 

	
 
<div class="btn-group">
 
  <a class="btn" href="{% url "checkout" user.id %}">Check out cart and view invoice</a>
 
</div>
 

	
 
<br />
 

	
 
<h3>Apply voucher</h3>
 

	
 
<form method="POST">
 
<form class="form-horizontal" method="POST">
 
  {% csrf_token %}
 
  {% include "_form_snippet.html" with form=voucher_form %}
 
  <br/>
 
  <input class="btn" type="submit">
 
</form>
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/credit_note.html
Show inline comments
 
{% extends "site_base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 
{% block body %}
 

	
 
<h2>Credit Note</h2>
 

	
 
{% with note_user=credit_note.invoice.user %}
 
  <ul>
 
    <li><strong>Number:</strong> {{ credit_note.id }}
 
    <li><strong>Attention:</strong> {{ credit_note.invoice.recipient }}</li>
 
    <li><strong>User:</strong> {{ credit_note.invoice.user.email }} ({{ credit_note.invoice.user.id}})</li>
 
    <li><strong>Value:</strong> {{ credit_note.value }}</li>
 
    <li><strong>Status:</strong> {{ credit_note.status }}</li>
 
  </ul>
 
{% endwith %}
 

	
 
<p>This credit note was generated from funds excess from invoice {{ credit_note.invoice.id }}.</p>
 

	
 
{% if credit_note.is_unclaimed %}
 
  <form method="post" action="">
 
  <form class="form-horizontal" method="post" action="">
 
    {% csrf_token %}
 
    <h3>Apply to invoice</h3>
 
    <p>You can apply this credit note to an unpaid invoice.</p>
 

	
 
    <p><strong>This credit note belongs to:</strong> {{ credit_note.invoice.user.email }} ({{ credit_note.invoice.user.id}}). You can apply this credit note to any user's invoice.</p>
 

	
 
      {{ apply_form|bootstrap }}
 
      <div class="form-actions">
 
          <input class="btn btn-primary" type="submit" value="Apply to invoice" />
 
      </div>
 
    <h3>Generate cancellation fee</h3>
 
    <p>You can generate an invoice for a cancellation fee, resulting in an invoice
 
      and a new credit note.
 
    </p>
 

	
 
      {{ cancellation_fee_form|bootstrap }}
 
      <div class="form-actions">
 
          <input class="btn btn-primary" type="submit" value="Generate fee" />
 
      </div>
 

	
 
    <h3>Stripe Refund</h3>
 

	
 
    <p><a href="{% url 'registripe_refund' credit_note.id %}">View Stripe refund options</a></p>
 

	
 
    <h3>Manual refund</h3>
 
    <p>You can mark this credit note as refunded, and handle the refund manually.
 
    </p>
 

	
 
      {{ refund_form|bootstrap }}
 
      <div class="form-actions">
 
          <input class="btn btn-primary" type="submit" value="Mark as refunded" />
 
      </div>
pinaxcon/templates/registrasion/guided_registration.html
Show inline comments
 
{% extends "registrasion/base.html" %}
 
{% load bootstrap %}
 
{% load pyconau2017_tags %}
 

	
 
{% block header_title %}Buy Your Ticket{% endblock %}
 
{% block header_paragraph %}Step {{ current_step }} of {{ total_steps|add:1 }} &ndash; {{ title }} {% endblock %}
 

	
 
{% block scripts_extra %}
 
  {% for section in sections %}
 
    {{ section.form.media.js }}
 
  {% endfor %}
 
{% endblock %}
 

	
 
{% block content %}
 

	
 
  <form method="post" action="">
 
  <form class="form-horizontal" method="post" action="">
 
    {% csrf_token %}
 

	
 
    {% for section in sections %}
 
      <h2>{{ section.title }}</h2>
 

	
 
      {% if section.description %}
 
        <blockquote>{{ section.description|safe }}</blockquote>
 
      {% endif %}
 

	
 
      <fieldset>
 

	
 
        {% if section.discounts %}
 
          {% include "registrasion/discount_list.html" with discounts=section.discounts %}
 

	
 
          <blockquote><small>
 
            You must select a product to receive any discounts.<br/>
 
            Applicable discounts will be applied automatically when you check out.
 
          </small></blockquote>
 

	
 
          <hr />
 

	
 
        {% endif %}
 

	
 
        <h3>Available options</h3>
 

	
 
        {% include "_form_snippet.html" with form=section.form %}
 
      </fieldset>
 

	
 
      <br />
 
    {% endfor %}
 

	
 
    <div class="btn-group">
pinaxcon/templates/registrasion/manual_payment.html
Show inline comments
 
{% extends "registrasion/base.html" %}
 
{% load bootstrap %}
 

	
 
{% block body %}
 

	
 
  <h1>Invoice {{ invoice.id }} - {{ invoice.get_status_display }}</h1>
 

	
 
  <h2>Past payments</h2>
 

	
 
  {% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %}
 

	
 
  <h2>Apply manual payment</h2>
 

	
 
  <p>Enter a reference and the amount of the payment. A refund is a negative
 
  payment.</p>
 

	
 
  <form method="post" action="">
 
  <form class="form-horizontal" method="post" action="">
 
    {% csrf_token %}
 

	
 
    <table>
 
        {{ form|bootstrap }}
 
    </table>
 

	
 
    <div class="form-actions">
 
        <input class="btn btn-primary" type="submit" value="Apply payment" />
 
        <a class="btn btn-default" href="{% url "invoice" invoice.id %}">Return to invoice</a>
 
    </div>
 
  </form>
 

	
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/nag_unpaid.html
Show inline comments
 
{% extends "site_base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 

	
 
{% block body %}
 

	
 
<h2>Send reminder e-mails</h2>
 

	
 
<form method="POST">
 
<form class="form-horizontal" method="POST">
 
  {% csrf_token %}
 
  {{ form | bootstrap}}
 
  <br/>
 
  <input type="submit">
 
</form>
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/product_category.html
Show inline comments
 
{% extends "registrasion/base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 
{% load pyconau2017_tags %}
 

	
 
{% block header_title %}Product Category: {{ category.name }}{% endblock %}
 
{% block header_inset_image %}{% illustration "lavender.svg" %}{% endblock %}
 

	
 
{% block scripts_extra %}
 
  {{ voucher_form.media.js }}
 
  {{ form.media.js }}
 

	
 
  <script type="text/javascript">
 
    function showVoucherForm() {
 
      $("#voucher-form").show();
 
      $("#voucher-form-button").hide();
 
    }
 

	
 
  </script>
 

	
 
{% endblock %}
 

	
 
{% block content %}
 

	
 
  <button id="voucher-form-button" class="btn" onclick="showVoucherForm()">Enter voucher code</button>
 

	
 
  <form method="post" action="">
 
  <form class="form-horizontal" method="post" action="">
 
    {% csrf_token %}
 

	
 
    <fieldset id="voucher-form" style="display: none;">
 
      {% include "_form_snippet.html" with form=voucher_form %}
 
      <div class="btn-group" />
 
        <input class="btn btn-primary" type="submit" value="Add voucher" />
 
      </div>
 
    </fieldset>
 

	
 
    <div class="vertical-bigger"></div>
 

	
 
    {% items_purchased category as items %}
 
    {% if items %}
 
      <h3>Paid items</h3>
 
      <p>You have already paid for the following items:</p>
 
      {% include "registrasion/_items_list.html" with items=items %}
 

	
 
    {% endif %}
 

	
 

	
 
    <h2>{{ category.name }}</h2>
 
    <blockquote>{{ category.description|safe }}</blockquote>
 

	
 
    <fieldset>
 

	
 
      {% if discounts %}
 
        <h3>Discounts and Complimentary Items</h3>
 
        <div class="vertical-small"></div>
 
        {% include "registrasion/discount_list.html" with discounts=discounts %}
 
        <blockquote><small>Any applicable discounts will be applied automatically when you check out.</small></blockquote>
 

	
 
        <hr />
pinaxcon/templates/registrasion/profile_form.html
Show inline comments
 
{% extends "registrasion/base.html" %}
 
{% load bootstrap %}
 
{% load pyconau2017_tags %}
 

	
 
{% block header_title %}Your profile{% endblock %}
 
{% block header_inset_image %}{% illustration "antarctica.svg" %}{% endblock %}
 
{% block header_paragraph %}
 
  These details will appear on your badge, your invoices, and will be used
 
  to order catered food at the conference.
 
{% endblock %}
 

	
 
{% block scripts_extra %}
 
  {{ form.media.js }}
 
    <script type="text/javascript">
 
  <script type="text/javascript">
 
  </script>
 
{% endblock %}
 

	
 
{% block content %}
 

	
 
  <form method="post" action="">
 
  <form class="form-horizontal" method="post" action="">
 
    {% csrf_token %}
 

	
 
    <fieldset>
 
        {% include "_form_snippet.html" with form=form %}
 
        <br />
 
        <div class="btn-group">
 
          <input class="btn" type="submit" value="Save Profile" />
 
          <a class="btn btn-primary" href="{% url "dashboard" %}">Return to dashboard</a>
 
        </div>
 
      {% include "_form_snippet.html" with form=form %}
 
      <br />
 
      <div class="btn-group">
 
        <input class="btn" type="submit" value="Save Profile" />
 
        <a class="btn btn-primary" href="{% url "dashboard" %}">Return to dashboard</a>
 
      </div>
 
    </fieldset>
 

	
 
  </form>
 
{% endblock %}
pinaxcon/templates/registrasion/report.html
Show inline comments
 
{% extends "site_base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 

	
 
{% block body %}
 

	
 
  <h2>{{ title }}</h2>
 

	
 
  <p><a href="{% url 'reports_list' %}">Return to reports list</a></p>
 

	
 
  {% if form %}
 
    <form method="GET">
 
    <form class="form-horizontal" method="GET">
 
      {{ form | bootstrap}}
 
      <br/>
 
      <input class="btn btn-primary" type="submit">
 
    </form>
 
  {% endif %}
 
<hr />
 

	
 
{% for report in reports %}
 
  <h3>{{ report.title }}</h3>
 
  <table class="table table-striped">
 
    <tr>
 
      {% for heading in report.headings %}
 
        <th>{{ heading }}</th>
 
      {% endfor %}
 
    </tr>
 
    {% for line in report.rows %}
 
      <tr>
 
        {% for item in line %}
 
          <td>
 
            {{ item|safe }}
 
          </td>
 
        {% endfor %}
 
      </tr>
 
    {% endfor %}
 
  </table>
 
{% endfor %}
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/stripe/credit_card_payment.html