Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
c0058f4b
Commit
c0058f4b
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
subject list contain information about type of subject list
parent
c84778d4
No related branches found
No related tags found
1 merge request
!129
Resolve "list shown after clicking on notifications"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
smash/web/models/study_subject_list.py
+1
-1
1 addition, 1 deletion
smash/web/models/study_subject_list.py
smash/web/templates/subjects/index.html
+2
-2
2 additions, 2 deletions
smash/web/templates/subjects/index.html
smash/web/views/subject.py
+12
-16
12 additions, 16 deletions
smash/web/views/subject.py
with
15 additions
and
19 deletions
smash/web/models/study_subject_list.py
+
1
−
1
View file @
c0058f4b
...
...
@@ -9,7 +9,7 @@ SUBJECT_LIST_REQUIRE_CONTACT = "REQUIRE_CONTACT"
SUBJECT_LIST_VOUCHER_EXPIRY
=
"
VOUCHER_EXPIRY
"
SUBJECT_LIST_CHOICES
=
{
SUBJECT_LIST_GENERIC
:
'
Generic
'
,
SUBJECT_LIST_GENERIC
:
'
Generic
subject list
'
,
SUBJECT_LIST_NO_VISIT
:
'
Subjects without visit
'
,
SUBJECT_LIST_REQUIRE_CONTACT
:
'
Subjects required contact
'
,
SUBJECT_LIST_VOUCHER_EXPIRY
:
'
Subject with vouchers to be expired soon
'
...
...
This diff is collapsed.
Click to expand it.
smash/web/templates/subjects/index.html
+
2
−
2
View file @
c0058f4b
...
...
@@ -8,10 +8,10 @@
{% endblock styles %}
{% block ui_active_tab %}'subjects'{% endblock ui_active_tab %}
{% block page_header %}
Subjects
{% endblock page_header %}
{% block page_header %}
{{ list_description }}
{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
{% block title %}{{ block.super }} -
Subjects
{% endblock %}
{% block title %}{{ block.super }} -
{{ list_description }}
{% endblock %}
{% block breadcrumb %}
{% include "subjects/breadcrumb.html" %}
...
...
This diff is collapsed.
Click to expand it.
smash/web/views/subject.py
+
12
−
16
View file @
c0058f4b
...
...
@@ -9,19 +9,24 @@ from ..forms import VisitDetailForm, SubjectAddForm, SubjectEditForm, StudySubje
from
..models
import
StudySubject
,
MailTemplate
,
Worker
,
Study
from
..models.constants
import
GLOBAL_STUDY_ID
from
..models.study_subject_list
import
SUBJECT_LIST_GENERIC
,
SUBJECT_LIST_NO_VISIT
,
SUBJECT_LIST_REQUIRE_CONTACT
,
\
SUBJECT_LIST_VOUCHER_EXPIRY
SUBJECT_LIST_VOUCHER_EXPIRY
,
SUBJECT_LIST_CHOICES
logger
=
logging
.
getLogger
(
__name__
)
def
subject
s
(
request
):
def
subject
_list
(
request
,
subject_list_type
):
context
=
{
'
list_type
'
:
SUBJECT_LIST_GENERIC
,
'
worker
'
:
Worker
.
get_by_user
(
request
.
user
)
'
list_type
'
:
subject_list_type
,
'
worker
'
:
Worker
.
get_by_user
(
request
.
user
),
'
list_description
'
:
SUBJECT_LIST_CHOICES
[
subject_list_type
],
}
return
wrap_response
(
request
,
'
subjects/index.html
'
,
context
)
def
subjects
(
request
):
return
subject_list
(
request
,
SUBJECT_LIST_GENERIC
)
def
subject_add
(
request
):
study
=
Study
.
objects
.
filter
(
id
=
GLOBAL_STUDY_ID
)[
0
]
if
request
.
method
==
'
POST
'
:
...
...
@@ -47,24 +52,15 @@ def subject_add(request):
def
subject_no_visits
(
request
):
context
=
{
'
list_type
'
:
SUBJECT_LIST_NO_VISIT
,
}
return
wrap_response
(
request
,
'
subjects/index.html
'
,
context
)
return
subject_list
(
request
,
SUBJECT_LIST_NO_VISIT
)
def
subject_voucher_expiry
(
request
):
context
=
{
'
list_type
'
:
SUBJECT_LIST_VOUCHER_EXPIRY
,
}
return
wrap_response
(
request
,
'
subjects/index.html
'
,
context
)
return
subject_list
(
request
,
SUBJECT_LIST_VOUCHER_EXPIRY
)
def
subject_require_contact
(
request
):
context
=
{
'
list_type
'
:
SUBJECT_LIST_REQUIRE_CONTACT
,
}
return
wrap_response
(
request
,
'
subjects/index.html
'
,
context
)
return
subject_list
(
request
,
SUBJECT_LIST_REQUIRE_CONTACT
)
def
subject_edit
(
request
,
id
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment