Merge branch 'ticket-testing' into 'master'

Expand proposal admin; add CFP management links

See merge request LCA2018/symposion_app!42
This commit is contained in:
James Polley 2017-09-24 00:55:55 +00:00
commit fa64473d58
10 changed files with 198 additions and 45 deletions

View file

@ -5,7 +5,7 @@
"end": "2017-11-30T12:59:00Z",
"published": false,
"section": 3,
"start": "2017-09-21T14:01:00Z"
"start": "2017-11-01T14:01:00Z"
},
"model": "symposion_proposals.proposalsection",
"pk": 3
@ -16,7 +16,7 @@
"end": "2017-11-30T12:59:00Z",
"published": false,
"section": 4,
"start": "2017-09-21T14:01:00Z"
"start": "2017-11-01T14:01:00Z"
},
"model": "symposion_proposals.proposalsection",
"pk": 4
@ -27,7 +27,7 @@
"end": "2017-11-30T12:59:00Z",
"published": false,
"section": 5,
"start": "2017-09-21T14:01:00Z"
"start": "2017-11-01T14:01:00Z"
},
"model": "symposion_proposals.proposalsection",
"pk": 5
@ -38,7 +38,7 @@
"end": "2017-11-30T12:59:00Z",
"published": false,
"section": 6,
"start": "2017-09-21T14:01:00Z"
"start": "2017-11-01T14:01:00Z"
},
"model": "symposion_proposals.proposalsection",
"pk": 6
@ -49,7 +49,7 @@
"end": "2017-11-29T13:01:00Z",
"published": false,
"section": 7,
"start": "2017-09-21T14:01:00Z"
"start": "2017-11-01T14:01:00Z"
},
"model": "symposion_proposals.proposalsection",
"pk": 7

View file

@ -11,6 +11,7 @@ docker exec symposion ./manage.py migrate
docker exec symposion ./manage.py loaddata ./fixtures/*.json
docker exec symposion ./manage.py populate_inventory
docker exec symposion ./manage.py create_review_permissions
docker exec symposion ./manage.py loaddata ./fixtures/miniconf-fixtures/*.json
if [ -e ./symposion-fixtures ]; then
pushd ./symposion-fixtures
./load_data_local.sh

View file

@ -2,29 +2,45 @@ from django.contrib import admin
from pinaxcon.proposals import models
from symposion.proposals import models as symposion_models
@admin.register(models.TalkProposal)
@admin.register(models.TutorialProposal)
@admin.register(models.MiniconfProposal)
@admin.register(models.SysAdminProposal)
@admin.register(models.KernelProposal)
@admin.register(models.GamesProposal)
@admin.register(models.OpenHardwareProposal)
@admin.register(models.ClsXLCAProposal)
@admin.register(models.FuncProgProposal)
@admin.register(models.OpenEdProposal)
@admin.register(models.OpenGLAMProposal)
@admin.register(models.FPGAProposal)
@admin.register(models.DevDevProposal)
@admin.register(models.ArtTechProposal)
@admin.register(models.BioInformaticsProposal)
from symposion.reviews.models import ProposalResult
class CategoryAdmin(admin.ModelAdmin):
class AdditionalSpeakerInline(admin.TabularInline):
model = symposion_models.AdditionalSpeaker
class ProposalResultInline(admin.TabularInline):
model = ProposalResult
readonly_fields = ["score"]
fields = ["status"]
inlines = [
AdditionalSpeakerInline,
ProposalResultInline,
]
for model in [ models.TalkProposal, models.TutorialProposal,
models.MiniconfProposal, models.SysAdminProposal,
models.KernelProposal, models.GamesProposal,
models.OpenHardwareProposal, models.ClsXLCAProposal,
models.FuncProgProposal, models.OpenEdProposal,
models.OpenGLAMProposal, models.FPGAProposal, models.DevDevProposal,
models.ArtTechProposal, models.BioInformaticsProposal ]:
admin.site.register(model, CategoryAdmin,
list_display = [
"id",
"title",
"speaker",
"speaker_email",
"kind",
"target_audience",
"status",
"cancelled",
],
list_filter = [
"result__status",
"cancelled",
],
)

View file

@ -256,6 +256,14 @@
<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>
{% if section in manage_sections %}
<ul>
<li><a href="{% url "review_bulk_update" section.section.slug %}">Bulk Update</a></li>
<li><a href="{% url "result_notification" section.section.slug "accepted" %}">Send notifications</a></li>
<li><a href="{% url "review_status" section.section.slug %}">Voting Status</a></li>
<li><a href="{% url "review_admin" section.section.slug %}">Reviewer Stats</a></li>
</ul>
{% endif %}
</div>
</div>
</div>
@ -299,31 +307,32 @@
{% 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>
</div>
<div class="page-row">
{% if available_teams %}
<div class="page-header">
<h3>Available Teams</h3>
</div>
{% endfor %}
<div class="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>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endblock %} <!-- block content -->

View file

@ -29,6 +29,14 @@
<div class="container">
{% sitetree_menu from "main" include "trunk" template "sitetree_header.html" %}
{% if messages %}
<ul class="messagelist">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<div class="well">
<h1>{% block header_title %}{% endblock %}</h1>
<p>{% block header_paragraph %}{% endblock %}</p>

View file

@ -1,3 +1,109 @@
.label-required:after { content: ' *'; }
textarea, .monospace-text { font-family: Hack, monospace; }
.monospace-text { white-space: pre-wrap; }
/* MESSAGES & ERRORS */
ul.messagelist {
padding: 0;
margin: 0;
}
ul.messagelist li {
display: block;
font-weight: 400;
font-size: 13px;
padding: 10px 10px 10px 65px;
margin: 0 0 10px 0;
background: #dfd url(../img/icon-yes.svg) 40px 12px no-repeat;
background-size: 16px auto;
color: #333;
}
ul.messagelist li.warning {
background: #ffc url(../img/icon-alert.svg) 40px 14px no-repeat;
background-size: 14px auto;
}
ul.messagelist li.error {
background: #ffefef url(../img/icon-no.svg) 40px 12px no-repeat;
background-size: 16px auto;
}
.errornote {
font-size: 14px;
font-weight: 700;
display: block;
padding: 10px 12px;
margin: 0 0 10px 0;
color: #ba2121;
border: 1px solid #ba2121;
border-radius: 4px;
background-color: #fff;
background-position: 5px 12px;
}
ul.errorlist {
margin: 0 0 4px;
padding: 0;
color: #ba2121;
background: #fff;
}
ul.errorlist li {
font-size: 13px;
display: block;
margin-bottom: 4px;
}
ul.errorlist li:first-child {
margin-top: 0;
}
ul.errorlist li a {
color: inherit;
text-decoration: underline;
}
td ul.errorlist {
margin: 0;
padding: 0;
}
td ul.errorlist li {
margin: 0;
}
.form-row.errors {
margin: 0;
border: none;
border-bottom: 1px solid #eee;
background: none;
}
.form-row.errors ul.errorlist li {
padding-left: 0;
}
.errors input, .errors select, .errors textarea {
border: 1px solid #ba2121;
}
div.system-message {
background: #ffc;
margin: 10px;
padding: 6px 8px;
font-size: .8em;
}
div.system-message p.system-message-title {
padding: 4px 5px 4px 25px;
margin: 0;
color: #c11;
background: #ffefef url(../img/icon-no.svg) 5px 5px no-repeat;
}
.description {
font-size: 12px;
padding: 5px 0 0 12px;
}

View file

@ -28,5 +28,12 @@ from symposion.proposals.models import ProposalSection, ProposalKind
# )
admin.site.register(ProposalSection)
admin.site.register(ProposalSection,
list_display = [
"section",
"start",
"end",
"closed",
"published"
])
admin.site.register(ProposalKind)

View file

@ -177,6 +177,7 @@ class ProposalBase(models.Model):
except ObjectDoesNotExist:
return _('Undecided')
def speakers(self):
yield self.speaker
speakers = self.additional_speakers.exclude(

View file

@ -40,7 +40,7 @@ def proposal_submit(request):
messages.info(request, _("To submit a proposal, please "
"<a href='{0}'>log in</a> and create a speaker profile "
"via the dashboard.".format(settings.LOGIN_URL)))
return redirect("home") # @@@ unauth'd speaker info page?
return redirect("dashboard") # @@@ unauth'd speaker info page?
else:
try:
request.user.speaker_profile

View file

@ -3,9 +3,14 @@ from symposion.proposals.models import ProposalSection
def reviews(request):
sections = []
manage_sections = {}
for section in ProposalSection.objects.all():
if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
sections.append(section)
if request.user.has_perm("reviews.can_manage_%s" % section.section.slug):
manage_sections.setdefault(section, []).append
return {
"review_sections": sections,
"manage_sections": manage_sections
}