forked from devilry/devilry-django
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coreutils.restful.metabases: Split each class into a file.
- Loading branch information
Showing
5 changed files
with
45 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,4 @@ | ||
class AssignmentExtjsModelMeta: | ||
""" Metadata for Assignment javascript. """ | ||
combobox_fieldgroups = ['subject', 'period'] | ||
combobox_tpl = ('<div class="important">{parentnode__parentnode__short_name}.{parentnode__short_name}.{short_name}</div>' | ||
'<div class="unimportant">{long_name}</div>') | ||
combobox_displayfield = 'short_name' | ||
|
||
class AssignmentGroupExtjsModelMeta: | ||
""" Metadata for AssignmentGroup javascript. """ | ||
combobox_fieldgroups = ['assignment', 'period', 'subject'] | ||
combobox_tpl = ('<div class="important">Group id: {id}' | ||
#'<tpl for="candidates__identifier">, {.}</tpl>' | ||
'</div>' | ||
'<div class="unimportant">' | ||
'{parentnode__parentnode__parentnode__short_name}.' | ||
'{parentnode__parentnode__short_name}.' | ||
'{parentnode__short_name}</div>') | ||
combobox_displayfield = 'id' | ||
|
||
class DeadlineExtjsModelMeta: | ||
""" Metadata for Deadline javascript. """ | ||
combobox_fieldgroups = ['assignment', 'period', 'subject'] | ||
combobox_tpl = ('<div class="important">{deadline:date}</div>' | ||
'<div class="unimportant">' | ||
'{assignment_group__parentnode__parentnode__parentnode__short_name}.' | ||
'{assignment_group__parentnode__parentnode__short_name}.' | ||
'{assignment_group__parentnode__short_name}' | ||
'— Group id: {assignment_group}</div>') | ||
combobox_displayfield = 'id' | ||
|
||
|
||
class DeliveryExtjsModelMeta: | ||
""" Metadata for Delivery javascript. """ | ||
combobox_fieldgroups = ['assignment', 'period', 'subject', | ||
'assignment_group'] | ||
combobox_tpl = ('<div class="important">Delivery: {number} ' | ||
'<tpl if="deadline__assignment_group__name"> – {deadline__assignment_group__name}</tpl>' | ||
#'<tpl for="deadline__assignment_group__candidates__identifier">, {.}</tpl>' | ||
'</div>' | ||
'<div class="unimportant">' | ||
'{deadline__assignment_group__parentnode__parentnode__parentnode__short_name}.' | ||
'{deadline__assignment_group__parentnode__parentnode__short_name}.' | ||
'{deadline__assignment_group__parentnode__short_name} ' | ||
'— Group id: {deadline__assignment_group}</div>') | ||
combobox_displayfield = 'id' | ||
from assignment import AssignmentExtjsModelMeta | ||
from assignment_group import AssignmentGroupExtjsModelMeta | ||
from deadline import DeadlineExtjsModelMeta | ||
from delivery import DeliveryExtjsModelMeta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class AssignmentExtjsModelMeta: | ||
""" Metadata for Assignment javascript. """ | ||
combobox_fieldgroups = ['subject', 'period'] | ||
combobox_tpl = ('<div class="important">{parentnode__parentnode__short_name}.{parentnode__short_name}.{short_name}</div>' | ||
'<div class="unimportant">{long_name}</div>') | ||
combobox_displayfield = 'short_name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class AssignmentGroupExtjsModelMeta: | ||
""" Metadata for AssignmentGroup javascript. """ | ||
combobox_fieldgroups = ['assignment', 'period', 'subject'] | ||
combobox_tpl = ('<div class="important">Group id: {id}' | ||
#'<tpl for="candidates__identifier">, {.}</tpl>' | ||
'</div>' | ||
'<div class="unimportant">' | ||
'{parentnode__parentnode__parentnode__short_name}.' | ||
'{parentnode__parentnode__short_name}.' | ||
'{parentnode__short_name}</div>') | ||
combobox_displayfield = 'id' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class DeadlineExtjsModelMeta: | ||
""" Metadata for Deadline javascript. """ | ||
combobox_fieldgroups = ['assignment', 'period', 'subject'] | ||
combobox_tpl = ('<div class="important">{deadline:date}</div>' | ||
'<div class="unimportant">' | ||
'{assignment_group__parentnode__parentnode__parentnode__short_name}.' | ||
'{assignment_group__parentnode__parentnode__short_name}.' | ||
'{assignment_group__parentnode__short_name}' | ||
'— Group id: {assignment_group}</div>') | ||
combobox_displayfield = 'id' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class DeliveryExtjsModelMeta: | ||
""" Metadata for Delivery javascript. """ | ||
combobox_fieldgroups = ['assignment', 'period', 'subject', | ||
'assignment_group'] | ||
combobox_tpl = ('<div class="important">Delivery: {number} ' | ||
'<tpl if="deadline__assignment_group__name"> – {deadline__assignment_group__name}</tpl>' | ||
#'<tpl for="deadline__assignment_group__candidates__identifier">, {.}</tpl>' | ||
'</div>' | ||
'<div class="unimportant">' | ||
'{deadline__assignment_group__parentnode__parentnode__parentnode__short_name}.' | ||
'{deadline__assignment_group__parentnode__parentnode__short_name}.' | ||
'{deadline__assignment_group__parentnode__short_name} ' | ||
'— Group id: {deadline__assignment_group}</div>') | ||
combobox_displayfield = 'id' |