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:
commit
fa64473d58
10 changed files with 198 additions and 45 deletions
|
@ -5,7 +5,7 @@
|
||||||
"end": "2017-11-30T12:59:00Z",
|
"end": "2017-11-30T12:59:00Z",
|
||||||
"published": false,
|
"published": false,
|
||||||
"section": 3,
|
"section": 3,
|
||||||
"start": "2017-09-21T14:01:00Z"
|
"start": "2017-11-01T14:01:00Z"
|
||||||
},
|
},
|
||||||
"model": "symposion_proposals.proposalsection",
|
"model": "symposion_proposals.proposalsection",
|
||||||
"pk": 3
|
"pk": 3
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
"end": "2017-11-30T12:59:00Z",
|
"end": "2017-11-30T12:59:00Z",
|
||||||
"published": false,
|
"published": false,
|
||||||
"section": 4,
|
"section": 4,
|
||||||
"start": "2017-09-21T14:01:00Z"
|
"start": "2017-11-01T14:01:00Z"
|
||||||
},
|
},
|
||||||
"model": "symposion_proposals.proposalsection",
|
"model": "symposion_proposals.proposalsection",
|
||||||
"pk": 4
|
"pk": 4
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
"end": "2017-11-30T12:59:00Z",
|
"end": "2017-11-30T12:59:00Z",
|
||||||
"published": false,
|
"published": false,
|
||||||
"section": 5,
|
"section": 5,
|
||||||
"start": "2017-09-21T14:01:00Z"
|
"start": "2017-11-01T14:01:00Z"
|
||||||
},
|
},
|
||||||
"model": "symposion_proposals.proposalsection",
|
"model": "symposion_proposals.proposalsection",
|
||||||
"pk": 5
|
"pk": 5
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
"end": "2017-11-30T12:59:00Z",
|
"end": "2017-11-30T12:59:00Z",
|
||||||
"published": false,
|
"published": false,
|
||||||
"section": 6,
|
"section": 6,
|
||||||
"start": "2017-09-21T14:01:00Z"
|
"start": "2017-11-01T14:01:00Z"
|
||||||
},
|
},
|
||||||
"model": "symposion_proposals.proposalsection",
|
"model": "symposion_proposals.proposalsection",
|
||||||
"pk": 6
|
"pk": 6
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
"end": "2017-11-29T13:01:00Z",
|
"end": "2017-11-29T13:01:00Z",
|
||||||
"published": false,
|
"published": false,
|
||||||
"section": 7,
|
"section": 7,
|
||||||
"start": "2017-09-21T14:01:00Z"
|
"start": "2017-11-01T14:01:00Z"
|
||||||
},
|
},
|
||||||
"model": "symposion_proposals.proposalsection",
|
"model": "symposion_proposals.proposalsection",
|
||||||
"pk": 7
|
"pk": 7
|
||||||
|
|
|
@ -11,6 +11,7 @@ docker exec symposion ./manage.py migrate
|
||||||
docker exec symposion ./manage.py loaddata ./fixtures/*.json
|
docker exec symposion ./manage.py loaddata ./fixtures/*.json
|
||||||
docker exec symposion ./manage.py populate_inventory
|
docker exec symposion ./manage.py populate_inventory
|
||||||
docker exec symposion ./manage.py create_review_permissions
|
docker exec symposion ./manage.py create_review_permissions
|
||||||
|
docker exec symposion ./manage.py loaddata ./fixtures/miniconf-fixtures/*.json
|
||||||
if [ -e ./symposion-fixtures ]; then
|
if [ -e ./symposion-fixtures ]; then
|
||||||
pushd ./symposion-fixtures
|
pushd ./symposion-fixtures
|
||||||
./load_data_local.sh
|
./load_data_local.sh
|
||||||
|
|
|
@ -2,29 +2,45 @@ from django.contrib import admin
|
||||||
|
|
||||||
from pinaxcon.proposals import models
|
from pinaxcon.proposals import models
|
||||||
from symposion.proposals import models as symposion_models
|
from symposion.proposals import models as symposion_models
|
||||||
|
from symposion.reviews.models import ProposalResult
|
||||||
|
|
||||||
@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)
|
|
||||||
|
|
||||||
class CategoryAdmin(admin.ModelAdmin):
|
class CategoryAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
class AdditionalSpeakerInline(admin.TabularInline):
|
class AdditionalSpeakerInline(admin.TabularInline):
|
||||||
model = symposion_models.AdditionalSpeaker
|
model = symposion_models.AdditionalSpeaker
|
||||||
|
|
||||||
|
class ProposalResultInline(admin.TabularInline):
|
||||||
|
model = ProposalResult
|
||||||
|
readonly_fields = ["score"]
|
||||||
|
fields = ["status"]
|
||||||
|
|
||||||
inlines = [
|
inlines = [
|
||||||
AdditionalSpeakerInline,
|
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",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
|
@ -256,6 +256,14 @@
|
||||||
<li><a href="{% url "user_reviewed" section.section.slug %}">Reviewed by you</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>
|
<li><a href="{% url "user_not_reviewed" section.section.slug %}">Not Reviewed by you</a></li>
|
||||||
</ul>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -299,31 +307,32 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% if available_teams %}
|
<div class="page-row">
|
||||||
<div class="page-header">
|
{% if available_teams %}
|
||||||
<h3>Available Teams</h3>
|
<div class="page-header">
|
||||||
</div>
|
<h3>Available Teams</h3>
|
||||||
<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>
|
</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>
|
</div>
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %} <!-- block content -->
|
{% endblock %} <!-- block content -->
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,14 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% sitetree_menu from "main" include "trunk" template "sitetree_header.html" %}
|
{% 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">
|
<div class="well">
|
||||||
<h1>{% block header_title %}{% endblock %}</h1>
|
<h1>{% block header_title %}{% endblock %}</h1>
|
||||||
<p>{% block header_paragraph %}{% endblock %}</p>
|
<p>{% block header_paragraph %}{% endblock %}</p>
|
||||||
|
|
|
@ -1,3 +1,109 @@
|
||||||
.label-required:after { content: ' *'; }
|
.label-required:after { content: ' *'; }
|
||||||
textarea, .monospace-text { font-family: Hack, monospace; }
|
textarea, .monospace-text { font-family: Hack, monospace; }
|
||||||
.monospace-text { white-space: pre-wrap; }
|
.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;
|
||||||
|
}
|
||||||
|
|
9
vendor/symposion/proposals/admin.py
vendored
9
vendor/symposion/proposals/admin.py
vendored
|
@ -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)
|
admin.site.register(ProposalKind)
|
||||||
|
|
1
vendor/symposion/proposals/models.py
vendored
1
vendor/symposion/proposals/models.py
vendored
|
@ -177,6 +177,7 @@ class ProposalBase(models.Model):
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
return _('Undecided')
|
return _('Undecided')
|
||||||
|
|
||||||
|
|
||||||
def speakers(self):
|
def speakers(self):
|
||||||
yield self.speaker
|
yield self.speaker
|
||||||
speakers = self.additional_speakers.exclude(
|
speakers = self.additional_speakers.exclude(
|
||||||
|
|
2
vendor/symposion/proposals/views.py
vendored
2
vendor/symposion/proposals/views.py
vendored
|
@ -40,7 +40,7 @@ def proposal_submit(request):
|
||||||
messages.info(request, _("To submit a proposal, please "
|
messages.info(request, _("To submit a proposal, please "
|
||||||
"<a href='{0}'>log in</a> and create a speaker profile "
|
"<a href='{0}'>log in</a> and create a speaker profile "
|
||||||
"via the dashboard.".format(settings.LOGIN_URL)))
|
"via the dashboard.".format(settings.LOGIN_URL)))
|
||||||
return redirect("home") # @@@ unauth'd speaker info page?
|
return redirect("dashboard") # @@@ unauth'd speaker info page?
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
request.user.speaker_profile
|
request.user.speaker_profile
|
||||||
|
|
|
@ -3,9 +3,14 @@ from symposion.proposals.models import ProposalSection
|
||||||
|
|
||||||
def reviews(request):
|
def reviews(request):
|
||||||
sections = []
|
sections = []
|
||||||
|
manage_sections = {}
|
||||||
for section in ProposalSection.objects.all():
|
for section in ProposalSection.objects.all():
|
||||||
if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
|
if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
|
||||||
sections.append(section)
|
sections.append(section)
|
||||||
|
if request.user.has_perm("reviews.can_manage_%s" % section.section.slug):
|
||||||
|
manage_sections.setdefault(section, []).append
|
||||||
return {
|
return {
|
||||||
"review_sections": sections,
|
"review_sections": sections,
|
||||||
|
"manage_sections": manage_sections
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue