diff --git a/fixtures/miniconf-fixtures/symposion_proposals.json b/fixtures/miniconf-fixtures/symposion_proposals.json index da6ca001..e54c63d1 100644 --- a/fixtures/miniconf-fixtures/symposion_proposals.json +++ b/fixtures/miniconf-fixtures/symposion_proposals.json @@ -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 diff --git a/make_dev_container.sh b/make_dev_container.sh index 6a057663..6cd97397 100755 --- a/make_dev_container.sh +++ b/make_dev_container.sh @@ -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 diff --git a/pinaxcon/proposals/admin.py b/pinaxcon/proposals/admin.py index 8070d290..d3e2278e 100644 --- a/pinaxcon/proposals/admin.py +++ b/pinaxcon/proposals/admin.py @@ -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", + ], + ) + diff --git a/pinaxcon/templates/dashboard.html b/pinaxcon/templates/dashboard.html index d9a08556..579899d1 100644 --- a/pinaxcon/templates/dashboard.html +++ b/pinaxcon/templates/dashboard.html @@ -256,6 +256,14 @@
{{ team.description }}
{% endif %} - {{ team.get_access_display }} - Details -{{ team.description }}
{% endif %} + {{ team.get_access_display }} + Details +{% block header_paragraph %}{% endblock %}
diff --git a/static/src/css/app.css b/static/src/css/app.css index c1125ca1..97289099 100644 --- a/static/src/css/app.css +++ b/static/src/css/app.css @@ -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; +} diff --git a/vendor/symposion/proposals/admin.py b/vendor/symposion/proposals/admin.py index af274aaa..37261f65 100644 --- a/vendor/symposion/proposals/admin.py +++ b/vendor/symposion/proposals/admin.py @@ -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) diff --git a/vendor/symposion/proposals/models.py b/vendor/symposion/proposals/models.py index 4a8650a0..08120eca 100644 --- a/vendor/symposion/proposals/models.py +++ b/vendor/symposion/proposals/models.py @@ -177,6 +177,7 @@ class ProposalBase(models.Model): except ObjectDoesNotExist: return _('Undecided') + def speakers(self): yield self.speaker speakers = self.additional_speakers.exclude( diff --git a/vendor/symposion/proposals/views.py b/vendor/symposion/proposals/views.py index 051a794b..925ad17c 100644 --- a/vendor/symposion/proposals/views.py +++ b/vendor/symposion/proposals/views.py @@ -40,7 +40,7 @@ def proposal_submit(request): messages.info(request, _("To submit a proposal, please " "log in 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 diff --git a/vendor/symposion/reviews/context_processors.py b/vendor/symposion/reviews/context_processors.py index 02850f15..7b164896 100644 --- a/vendor/symposion/reviews/context_processors.py +++ b/vendor/symposion/reviews/context_processors.py @@ -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 } +