-
Notifications
You must be signed in to change notification settings - Fork 112
Initialize setting review / proposal stage page #782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 14 commits
1497d90
f3095e6
8bb98fb
57d036c
e3fcda2
2881ea9
db4fea7
6ef2f5b
211bf3c
048c941
76c39dc
fdd09ab
8ade9c1
cfb5fa1
afaf6d5
88ee598
9ef909e
d579e69
2fb312d
500b9db
ced5b07
928e2d1
32f30a1
c4ef31e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,8 @@ | |
| .text-emphasize { | ||
| @include roboto-medium(); | ||
| } | ||
|
|
||
| .input-customized-size input{ | ||
| width: 16.2em; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| .material-switch > input[type="checkbox"] { | ||
| display: none; | ||
| } | ||
|
|
||
| .material-switch > label { | ||
| cursor: pointer; | ||
| height: 0px; | ||
| position: relative; | ||
| width: 40px; | ||
| } | ||
|
|
||
| .material-switch > label::before { | ||
| background: rgb(0, 0, 0); | ||
| box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5); | ||
| border-radius: 8px; | ||
| content: ''; | ||
| height: 16px; | ||
| margin-top: -8px; | ||
| position:absolute; | ||
| opacity: 0.3; | ||
| transition: all 0.4s ease-in-out; | ||
| width: 40px; | ||
| } | ||
|
|
||
| .material-switch > label::after { | ||
| background: rgb(255, 255, 255); | ||
| border-radius: 16px; | ||
| box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); | ||
| content: ''; | ||
| height: 24px; | ||
| left: -4px; | ||
| margin-top: -8px; | ||
| position: absolute; | ||
| top: -4px; | ||
| transition: all 0.3s ease-in-out; | ||
| width: 24px; | ||
| } | ||
|
|
||
| .material-switch > input[type="checkbox"]:checked + label::before { | ||
| background: inherit; | ||
| opacity: 0.5; | ||
| } | ||
|
|
||
| .material-switch > input[type="checkbox"]:checked + label::after { | ||
| background: inherit; | ||
| left: 20px; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
|
|
||
| var proposals_creatable = document.getElementById("proposals.creatable"); | ||
| var proposals_editable = document.getElementById("proposals.editable"); | ||
| var proposals_withdrawable = document.getElementById("proposals.withdrawable"); | ||
| var reviews_stage = document.getElementById("reviews.stage"); | ||
| var reviews_visible_to_submitters = document.getElementById("reviews.visible.to.submitters"); | ||
|
|
||
| $('.hotkey').click(function () { | ||
| if ($(this).val() == "Call for Proposals") { | ||
| Call_for_Proposals(); | ||
| } | ||
| else if ($(this).val() == "First Round Review_1") { | ||
| First_Round_Review_1() | ||
| } | ||
| else if ($(this).val() == "First Round Review") { | ||
| First_Round_Review() | ||
| } | ||
| else if ($(this).val() == "Modification Stage") { | ||
| Modification_Stage() | ||
| } | ||
| else if ($(this).val() == "Second Round Review") { | ||
| Second_Round_Review() | ||
| } | ||
| else if ($(this).val() == "Internal Decision") { | ||
| Internal_Decision() | ||
| } | ||
| else { | ||
| Announcement_of_Acceptance() | ||
| } | ||
|
|
||
| /* | ||
| Proposal Review Stage Setting | ||
| Reference : https://github.com/pycontw/pycon.tw/blob/master/src/reviews/README.md | ||
| */ | ||
| function Call_for_Proposals(){ | ||
| proposals_creatable.checked = true; | ||
| proposals_editable.checked = true; | ||
| proposals_withdrawable.checked = true; | ||
| reviews_stage.value = 0; | ||
| reviews_visible_to_submitters.checked = false; | ||
| } | ||
| function First_Round_Review_1() { | ||
| proposals_creatable.checked = false; | ||
| proposals_editable.checked = false; | ||
| proposals_withdrawable.checked = false; | ||
| reviews_stage.value = "0"; | ||
| reviews_visible_to_submitters.checked = false; | ||
| } | ||
| function First_Round_Review() { | ||
| proposals_creatable.checked = false; | ||
| proposals_editable.checked = false; | ||
| proposals_withdrawable.checked = false; | ||
| reviews_stage.value = "1"; | ||
| reviews_visible_to_submitters.checked = false; | ||
| } | ||
| function Modification_Stage() { | ||
| proposals_creatable.checked = false; | ||
| proposals_editable.checked = true; | ||
| proposals_withdrawable.checked = false; | ||
| reviews_stage.value = "0"; | ||
| reviews_visible_to_submitters.checked = true; | ||
| } | ||
| function Second_Round_Review() { | ||
| proposals_creatable.checked = false; | ||
| proposals_editable.checked = false; | ||
| proposals_withdrawable.checked = false; | ||
| reviews_stage.value = "2"; | ||
| reviews_visible_to_submitters.checked = false; | ||
| } | ||
| function Internal_Decision() { | ||
| proposals_creatable.checked = false; | ||
| proposals_editable.checked = false; | ||
| proposals_withdrawable.checked = false; | ||
| reviews_stage.value = "0"; | ||
| reviews_visible_to_submitters.checked = false; | ||
| } | ||
| function Announcement_of_Acceptance() { | ||
| proposals_creatable.checked = false; | ||
| proposals_editable.checked = true; | ||
| proposals_withdrawable.checked = false; | ||
| reviews_stage.value = "0"; | ||
| reviews_visible_to_submitters.checked = true; | ||
| } | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| {% extends 'dashboard_base.html' %} | ||
|
|
||
| {% load i18n static %} | ||
| {% load proposals %} | ||
| {% load compress crispy_forms_tags %} | ||
| {% load tz %} | ||
| {% get_current_timezone as TIME_ZONE %} | ||
|
|
||
| {% block dashboard_tablist %} | ||
| {% include '_includes/dashboard_tablist.html' with active='admin' %} | ||
| {% endblock dashboard_tablist %} | ||
|
|
||
| {% block main-content %} | ||
|
|
||
| <h3 class="dashboard-header"> | ||
| <span class="header-title">{% trans 'Review Stages' %}</span> | ||
| </h3> | ||
|
|
||
| <div class="dashboard-body"> | ||
| <!--Hot Key Button--> | ||
| <div class="col-md-3"> | ||
| {% for rs in review_stages_list %} | ||
| <button class="btn btn-natural-noborder hotkey" value="{{ rs }}">{{ rs }}</button> | ||
| {% endfor %} | ||
| </div> | ||
| <!--Review Change Setting--> | ||
| <div class="col-md-9"> | ||
tomatoprinx marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <form action="{% url 'review_stages' %}" method="post"> | ||
| {% csrf_token %} | ||
| <div class="panel panel-default"> | ||
| <div class="panel-heading">{% trans 'Review Stages' %} | ||
| <div class="material-switch pull-right"> | ||
| <a href="https://github.com/pycontw/pycon.tw/blob/master/src/reviews/README.md">See Proposal Review System | ||
| Documentation</a> | ||
| </div> | ||
| </div> | ||
| <ul class="list-group"> | ||
| <li class="panel-title list-group-item"> | ||
| {{ ".proposals.creatable"|configuration_switch }} | ||
| <div class="material-switch pull-right"> | ||
| <input name="proposals.creatable" type='hidden' value="false" /> | ||
| <input id="proposals.creatable" name="proposals.creatable" type="checkbox" value="true"/> | ||
| <label for="proposals.creatable" class="label-info"></label> | ||
| </div> | ||
| </li> | ||
| <li class="panel-title list-group-item"> | ||
| {{ ".proposals.editable"|configuration_switch }} | ||
| <div class="material-switch pull-right"> | ||
| <input name="proposals.editable" type='hidden' value="false" /> | ||
| <input id="proposals.editable" name="proposals.editable" type="checkbox" value="true"/> | ||
| <label for="proposals.editable" class="label-info"></label> | ||
| </div> | ||
| </li> | ||
| <li class="panel-title list-group-item"> | ||
| {{ ".proposals.withdrawable"|configuration_switch }} | ||
| <div class="material-switch pull-right"> | ||
| <input name="proposals.withdrawable" type='hidden' value="false" /> | ||
| <input id="proposals.withdrawable" name="proposals.withdrawable" type="checkbox" value="true"/> | ||
| <label for="proposals.withdrawable" class="label-info"></label> | ||
| </div> | ||
| </li> | ||
| <li class="panel-title list-group-item"> | ||
| {{ ".reviews.visible.to.submitters"|configuration_switch }} | ||
| <div class="material-switch pull-right"> | ||
| <input name="reviews.visible.to.submitters" type='hidden' value="false" /> | ||
| <input id="reviews.visible.to.submitters" name="reviews.visible.to.submitters" | ||
| type="checkbox" value="true"/> | ||
| <label for="reviews.visible.to.submitters" class="label-info"></label> | ||
| </div> | ||
| </li> | ||
| <li class="panel-title list-group-item"> | ||
| {{ ".reviews.stage"|configuration_switch }} | ||
| <div class="input-customized-size pull-right"> | ||
| <input id="reviews.stage" name="reviews.stage" type="number" min="0" max="2" | ||
| placeholder="Int" required="required"> | ||
| </div> | ||
| </li> | ||
| <li class="panel-title list-group-item"> | ||
| {{ ".proposals.disable.after"|configuration_switch }} | ||
| <div class="input-customized-size pull-right"> | ||
| <input name="proposals.disable.after" type="datetime-local" step="1" | ||
| placeholder="yyyy-mm-dd hh:mm:ss" required="required"> | ||
|
||
| </div> | ||
| </li> | ||
| <li class="panel-title list-group-item"> | ||
| timezone | ||
| <div class="input-customized-size pull-right"> | ||
| <select name="review_timezone"> | ||
| {% for tz in timezones %} | ||
| <option value="{{ tz }}" {% if tz == TIME_ZONE %} selected{% endif %}>{{ tz }}</option> | ||
| {% endfor %} | ||
| </select> | ||
| </div> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
|
|
||
| <div class="nesting-form-group"> | ||
| {{ form|crispy }} | ||
| <button type="submit" class="btn btn-info pull-right"> | ||
| {% trans 'Submit' %} | ||
| </button> | ||
| </div> | ||
| </form> | ||
| </div> | ||
| </div> | ||
|
|
||
| {% endblock main-content %} | ||
|
|
||
| {% block extra_js %} | ||
| {% compress js %} | ||
| <script src="{% static 'js/reviews/review_stages.js' %}"></script> | ||
| {% endcompress %} | ||
| {% endblock extra_js %} | ||
|
||

Uh oh!
There was an error while loading. Please reload this page.