diff --git a/adim_project/adim/management/commands/adim_cleanup.py b/adim_project/adim/management/commands/adim_cleanup.py index ce103b1b9d9519cbb97d287245681f12a318dbea..a42e264c3d6bc6963f0d5b92ace9f173718a67bc 100644 --- a/adim_project/adim/management/commands/adim_cleanup.py +++ b/adim_project/adim/management/commands/adim_cleanup.py @@ -1,4 +1,4 @@ -from django.core.management.base import CommandError, NoArgsCommand +from django.core.management.base import CommandError, BaseCommand 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(NoArgsCommand): +class Command(BaseCommand): 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(NoArgsCommand, 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) diff --git a/adim_project/adim_app/static/_src/scss/adim.css b/adim_project/adim_app/static/_src/scss/adim.css index e152afd831ac6ea745c3a112366da5fb75c8cd86..8f70d096c6537edbe7a3e91b0e5f277d9952d7c6 100644 --- a/adim_project/adim_app/static/_src/scss/adim.css +++ b/adim_project/adim_app/static/_src/scss/adim.css @@ -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; diff --git a/adim_project/adim_project/settings/base.py b/adim_project/adim_project/settings/base.py index 06fcf3ffdae5e7861b8618e60c5fdc3d010a21f8..f70b263cfd40194ac6f27690b1bb43889ece8137 100644 --- a/adim_project/adim_project/settings/base.py +++ b/adim_project/adim_project/settings/base.py @@ -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': { diff --git a/adim_project/adim_project/settings/staging.py b/adim_project/adim_project/settings/staging.py index 7a883d0cc6e8a6fd65b5d75230c32ce56a2f39e7..281cf7b079789519e59307b4b1167d39973fe4d2 100644 --- a/adim_project/adim_project/settings/staging.py +++ b/adim_project/adim_project/settings/staging.py @@ -18,12 +18,14 @@ DATABASES = { 'NAME': 'adim_dev2', 'USER': 'adim', 'PASSWORD': 'ioue634jrs8asdfd0hewq876iujkh9877iuzhiuhg9875kb', - 'HOST': 'localhost', + 'HOST': 'leia.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 diff --git a/adim_project/templates/adim/env/anodate/annotation.html b/adim_project/templates/adim/env/anodate/annotation.html index 2f811535a378ed256b661f2c2d382781ade2e737..404a23169893c33cccab5200d10762a47b1f380c 100644 --- a/adim_project/templates/adim/env/anodate/annotation.html +++ b/adim_project/templates/adim/env/anodate/annotation.html @@ -196,11 +196,11 @@ @@ -319,10 +319,10 @@ diff --git a/adim_project/templates/base.html b/adim_project/templates/base.html index d591ced531ae0dc49b1485a220750223f00e7164..4518f61735c8bb46d5ebb34f294d202ea177de19 100644 --- a/adim_project/templates/base.html +++ b/adim_project/templates/base.html @@ -21,6 +21,9 @@