Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
ADIM
Commits
d812c263
Commit
d812c263
authored
Mar 20, 2018
by
M. Chardon
Browse files
Merge branch 'django' into 'javascript'
Django See merge request
!5
parents
83a89651
403384eb
Changes
6
Hide whitespace changes
Inline
Side-by-side
adim_project/adim/management/commands/adim_cleanup.py
View file @
d812c263
from
django.core.management.base
import
CommandError
,
NoArgs
Command
from
django.core.management.base
import
CommandError
,
Base
Command
from
django.conf
import
settings
from
adim.models
import
AnObj
import
os
...
...
@@ -6,19 +6,28 @@ import sys
from
optparse
import
make_option
class
Command
(
NoArgs
Command
):
class
Command
(
Base
Command
):
help
=
'Remove image files not used by an Annotable Object'
option_list
=
NoArgsCommand
.
option_list
+
(
make_option
(
'--noinput'
,
action
=
'store_false'
,
dest
=
'interactive'
,
default
=
True
,
help
=
"Do NOT prompt the user for input of any kind."
),
make_option
(
'-n'
,
'--dry-run'
,
action
=
'store_true'
,
dest
=
'dry_run'
,
default
=
False
,
help
=
"Do everything except modify the filesystem."
),
)
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--noinput'
,
action
=
'store_false'
,
dest
=
'interactive'
,
default
=
True
,
help
=
"Do NOT prompt the user for input of any kind."
)
parser
.
add_argument
(
'-n'
,
'--dry-run'
,
action
=
'store_true'
,
dest
=
'dry_run'
,
default
=
False
,
help
=
"Do everything except modify the filesystem."
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
NoArgs
Command
,
self
).
__init__
(
*
args
,
**
kwargs
)
super
(
Command
,
self
).
__init__
(
*
args
,
**
kwargs
)
self
.
dry_run
=
False
self
.
interactive
=
True
self
.
verbosity
=
1
...
...
@@ -31,7 +40,7 @@ class Command(NoArgsCommand):
self
.
dry_run
=
options
[
'dry_run'
]
self
.
verbosity
=
int
(
options
[
'verbosity'
])
if
self
.
interactive
else
0
def
handle
_noargs
(
self
,
**
options
):
def
handle
(
self
,
*
args
,
**
options
):
self
.
set_options
(
**
options
)
anobj_uuid_list
=
AnObj
.
objects
.
all
().
values_list
(
'uuid'
,
flat
=
True
)
...
...
adim_project/adim_app/static/_src/scss/adim.css
View file @
d812c263
...
...
@@ -3568,6 +3568,11 @@ canvas.cursor-tool-arrowgeo {
padding
:
0
3px
0
0
;
border-right
:
solid
1px
#c9c9c9
;
width
:
30px
;
text-align
:
center
;
}
#annotation-markers-panel
.card-body
.list-group-item-heading
h4
{
min-width
:
27px
;
text-align
:
center
;
}
.adim-env-geomo
.adim-view-review
#side-col
.col-sm-1
{
width
:
250px
;
...
...
adim_project/adim_project/settings/base.py
View file @
d812c263
...
...
@@ -327,12 +327,14 @@ AAI = {
#
# CAUTION: when adding a ttp service, update the template (templates/adim/aom-modal.inc.html) with MODE_ID where needed
#
MOODLE_HREF
=
"http://moodle2.unil.ch/mod/adim/checkAccess.php?uuid={uuid}"
ATTP
=
{
'OPTIONS'
:
{
'CACHE_TIMEOUT'
:
20
,
# 30,
},
'moodle'
:
{
'CHECK_URL'
:
"http://moodle2.unil.ch/mod/adim/checkAccess.php?uuid={uuid}"
,
'CHECK_URL'
:
MOODLE_HREF
,
'MODE_ID'
:
16
},
'toto'
:
{
...
...
adim_project/adim_project/settings/staging.py
View file @
d812c263
...
...
@@ -18,12 +18,14 @@ DATABASES = {
'NAME'
:
'adim_dev2'
,
'USER'
:
'adim'
,
'PASSWORD'
:
'ioue634jrs8asdfd0hewq876iujkh9877iuzhiuhg9875kb'
,
'HOST'
:
'l
ocalhost
'
,
'HOST'
:
'l
eia.unil.ch
'
,
},
}
MOODLE_HREF
=
"https://tstmoodle.unil.ch/33/mod/adim/checkAccess.php?uuid={uuid}"
ADIM_PROD
=
False
ADIM_DEBUG_JS
=
False
# Only the ip listed here can access the admin interface
INTERNAL_IPS
=
(
'130.223.159.72'
,
)
INTERNAL_IPS
=
(
'130.223.159.72'
,
)
\ No newline at end of file
adim_project/templates/adim/env/anodate/annotation.html
View file @
d812c263
...
...
@@ -196,11 +196,11 @@
<script
type=
"text/template"
id=
"adim-tool-marker-label"
>
<
li
class
=
"
adim-tool-marker-label-item list-group-item list-group-item-secondary
"
data
-
label
=
"
<%= label %>
"
data
-
annot
-
id
=
"
<%= id %>
"
>
<
div
class
=
"
list-group-item-heading text-center
"
style
=
"
float:left;width:12%
"
>
<
h4
><%=
label
%><
/h4
>
<
/div
>
<
div
class
=
"
list-group-item-text
"
style
=
"
width:88%;margin-left:12%
"
>
<
textarea
class
=
"
form-control
"
style
=
"
resize: vertical
"
<%=
ro
?
'
readonly
'
:
''
%>><%=
labelComment
%><
/textarea
>
<
div
class
=
"
d-inline-flex justify-content-start
"
>
<
div
class
=
"
p-1 list-group-item-heading
"
>
<
h4
><%=
label
%><
/h4>
</
div
>
<
div
class
=
"
ml-auto p-1 list-group-item-text
"
>
<
textarea
class
=
"
form-control
"
style
=
"
resize: vertical
"
<%=
ro
?
'
readonly
'
:
''
%>><%=
labelComment
%><
/textarea
>
<
/div
>
<
/div
>
<
/li
>
</script>
...
...
@@ -319,10 +319,10 @@
<script
type=
"text/template"
id=
"shared-adim-tool-marker-label"
>
<
li
class
=
"
adim-tool-marker-label-item list-group-item
"
data
-
annot
-
id
=
"
<%= id %>
"
>
<
div
class
=
"
list-group-item-heading text-center float-left
"
>
<
h5
><%=
label
%><
/h5
>
<
div
class
=
"
d-flex justify-content-start
"
>
<
div
class
=
"
p-1 list-group-item-heading
"
><
h5
><%=
label
%><
/h5></
div
>
<
div
class
=
"
p-1 list-group-item-text
"
><%=
labelComment
%><
/div
>
<
/div
>
<
div
class
=
"
list-group-item-text clearfix small
"
><%=
labelComment
%><
/div
>
<
/li
>
</script>
</div>
...
...
adim_project/templates/base.html
View file @
d812c263
...
...
@@ -21,6 +21,9 @@
<div
class=
"navbar-header"
>
{% block navbar_brand %}
<a
class=
"navbar-brand"
href=
"{% url "
adim.app:home
"
%}"
>
ADIM
</a>
{% if debug %}
<span
style=
"color:red;font-weight: bold;font-size: large;"
><i
class=
"fa fa-exclamation-triangle"
></i>
ENVIRONNEMENT DE TEST
</span>
{% endif %}
{% endblock %}
</div>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#collapsibleNavbar"
>
...
...
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