Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
work.w
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
osp
work.w
Commits
459cf729
Commit
459cf729
authored
Jan 10, 2019
by
alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undetermined value for score type + a few trans
parent
40261851
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
10 deletions
+35
-10
playground/migrations/0025_auto_20190110_1739.py
playground/migrations/0025_auto_20190110_1739.py
+26
-0
playground/models.py
playground/models.py
+2
-1
playground/serializers.py
playground/serializers.py
+2
-0
playground/static/playground/js/i18n/en.js
playground/static/playground/js/i18n/en.js
+3
-3
playground/static/playground/js/models.js
playground/static/playground/js/models.js
+1
-1
playground/templates/playground/underscore/score-form.mtpl
playground/templates/playground/underscore/score-form.mtpl
+1
-0
playground/templates/playground/underscore/score-vue.mtpl
playground/templates/playground/underscore/score-vue.mtpl
+0
-5
No files found.
playground/migrations/0025_auto_20190110_1739.py
0 → 100644
View file @
459cf729
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-01-10 17:39
from
__future__
import
unicode_literals
from
django.conf
import
settings
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'playground'
,
'0024_auto_20190104_1426'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'score'
,
name
=
'score_type'
,
field
=
models
.
PositiveSmallIntegerField
(
choices
=
[(
0
,
'inconnu'
),
(
1
,
'transcription'
),
(
2
,
'prescription'
),
(
3
,
'traduction'
)],
default
=
0
),
),
migrations
.
AlterField
(
model_name
=
'score'
,
name
=
'shared_with'
,
field
=
models
.
ManyToManyField
(
blank
=
True
,
to
=
settings
.
AUTH_USER_MODEL
),
),
]
playground/models.py
View file @
459cf729
...
...
@@ -16,6 +16,7 @@ class Score(models.Model):
"""docstring"""
SCORE_TYPE_CHOICES
=
(
(
0
,
"inconnu"
),
(
1
,
"transcription"
),
(
2
,
"prescription"
),
(
3
,
"traduction"
)
...
...
@@ -25,7 +26,7 @@ class Score(models.Model):
created_at
=
models
.
DateTimeField
(
auto_now_add
=
True
)
updated_at
=
models
.
DateTimeField
(
auto_now
=
True
)
score_type
=
models
.
PositiveSmallIntegerField
(
default
=
1
,
choices
=
SCORE_TYPE_CHOICES
)
default
=
0
,
choices
=
SCORE_TYPE_CHOICES
)
score_author
=
models
.
TextField
(
blank
=
True
)
performance_author
=
models
.
TextField
(
blank
=
True
)
presentation
=
models
.
TextField
(
blank
=
True
)
...
...
playground/serializers.py
View file @
459cf729
...
...
@@ -57,6 +57,8 @@ class ScoreSerializer(TaggitSerializer, serializers.HyperlinkedModelSerializer):
def
create
(
self
,
validated_data
):
validated_data
[
"created_by"
]
=
self
.
context
[
'request'
]
.
user
# created_by = validated_data.pop('created_by')
shared_with
=
validated_data
.
pop
(
'shared_with'
)
instance
=
Score
.
objects
.
create
(
**
validated_data
)
return
instance
...
...
playground/static/playground/js/i18n/en.js
View file @
459cf729
;
window
.
W
=
window
.
W
||
{};
W
.
lang
=
W
.
lang
||
{};
...
...
@@ -53,7 +53,7 @@ W.lang.en = {
"
La notation W
"
:
"
The W notation
"
,
"
Le choix de W
"
:
"
The W selection
"
,
"
Mise
"
:
"
Set
"
,
"
Modifié le
"
:
"
Modified on
"
,
"
Modifié
e
le
"
:
"
Modified on
"
,
"
OK
"
:
"
OK
"
,
"
Ok
"
:
"
Ok
"
,
"
Partager avec
"
:
"
Share with
"
,
...
...
@@ -65,7 +65,7 @@ W.lang.en = {
"
performeur(s)
"
:
"
performer(s)
"
,
"
Prescription
"
:
"
Prescription
"
,
"
Présentation
"
:
"
Presentation
"
,
"
Publié le
"
:
"
Published on
"
,
"
Créée le
"
:
"
Created at
"
,
"
rechercher
"
:
"
search
"
,
"
Répertoire de partitions
"
:
"
Score directory
"
,
"
rompre le lien
"
:
"
break link
"
,
...
...
playground/static/playground/js/models.js
View file @
459cf729
...
...
@@ -123,7 +123,7 @@ window.W = window.W || {};
duration
:
''
,
genre
:
''
,
tags
:
''
,
score_type
:
1
,
score_type
:
0
,
score_author
:
""
,
performance_author
:
""
,
presentation
:
""
,
...
...
playground/templates/playground/underscore/score-form.mtpl
View file @
459cf729
...
...
@@ -32,6 +32,7 @@
<label>
<span class="label-text"><%- t('Type') %>:</span>
<select name="score_type">
<option value="0" <%- (score_type === 0) ? 'selected' : '' %>><%- t('Indéterminé') %></option>
<option value="1" <%- (score_type === 1) ? 'selected' : '' %>><%- t('Transcription') %></option>
<option value="2" <%- (score_type === 2) ? 'selected' : '' %>><%- t('Prescription') %></option>
<option value="3" <%- (score_type === 3) ? 'selected' : '' %>><%- t('Traduction') %></option>
...
...
playground/templates/playground/underscore/score-vue.mtpl
View file @
459cf729
...
...
@@ -125,11 +125,6 @@
</dl>
{% endcomment %}
<dl class="score-meta">
<dt class="score-meta__term score-meta__term--inline"><%- t('Publiée?') %></dt>
<dd class="score-meta__def"><%- is_public %></dd>
</dl>
<div id="permissions"></div>
<form></form>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment