diff --git a/beat/web/reports/templates/reports/dialogs/report_lock.html b/beat/web/reports/templates/reports/dialogs/report_lock.html deleted file mode 100644 index 57dd4b9c64515f46a76c268a776053f41117f388..0000000000000000000000000000000000000000 --- a/beat/web/reports/templates/reports/dialogs/report_lock.html +++ /dev/null @@ -1,41 +0,0 @@ -{% comment %} - * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ - * Contact: beat.support@idiap.ch - * - * This file is part of the beat.web module of the BEAT platform. - * - * Commercial License Usage - * Licensees holding valid commercial BEAT licenses may use this file in - * accordance with the terms contained in a written agreement between you - * and Idiap. For further information contact tto@idiap.ch - * - * Alternatively, this file may be used under the terms of the GNU Affero - * Public License version 3 as published by the Free Software and appearing - * in the file LICENSE.AGPL included in the packaging of this file. - * The BEAT platform is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU Affero Public License along - * with the BEAT platform. If not, see http://www.gnu.org/licenses/. -{% endcomment %} -<div id="{{ dialog_id }}" class="report_lock" title="Report" style="display:none"> - <p class="explanation">Locking a report</p> - - - <div class="explanation_text"> - <p class="experiments">1) Locking your report is the first step for publication.</p> - <p>2) Your report will not be editable anymore.</p> - <p>3) In order to do lock your report, we will need to make the experiments you have added non deletable. This means that your experiments will be locked too.</p> - <p>Do you wish to proceed?</p> - </div> - <div class="warnings" style="display:none"> - <p class="experiments">Sucessfully locked the report</p> - <ul class="experimentslist"></ul> - </div> - - <div class="errors" style="display:none"> - <p class="errors">Some errors occured while attempting to lock the report:</p> - <ul class="errorslist"></ul> - </div> -</div> diff --git a/beat/web/reports/templates/reports/dialogs/report_publish.html b/beat/web/reports/templates/reports/dialogs/report_publish.html deleted file mode 100644 index 5019d7770872948345e16fa00f1cfe6975227cbb..0000000000000000000000000000000000000000 --- a/beat/web/reports/templates/reports/dialogs/report_publish.html +++ /dev/null @@ -1,45 +0,0 @@ -{% comment %} - * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ - * Contact: beat.support@idiap.ch - * - * This file is part of the beat.web module of the BEAT platform. - * - * Commercial License Usage - * Licensees holding valid commercial BEAT licenses may use this file in - * accordance with the terms contained in a written agreement between you - * and Idiap. For further information contact tto@idiap.ch - * - * Alternatively, this file may be used under the terms of the GNU Affero - * Public License version 3 as published by the Free Software and appearing - * in the file LICENSE.AGPL included in the packaging of this file. - * The BEAT platform is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU Affero Public License along - * with the BEAT platform. If not, see http://www.gnu.org/licenses/. -{% endcomment %} -<div id="{{ dialog_id }}" class="report_publish" title="Report" style="display:none"> - <p class="explanation">Publishing a report</p> - - - <div class="explanation_text"> - <p class="experiments">1) Publishing your report will make it accessible to anyone.</p> - <p>2) Your report will not be editable anymore.</p> - <p>Do you wish to proceed?</p> - <div class="algorithms" style="display:none"> - <p class="algorithms_text">The following algorithms will become public. - Select those that will become open-source:</p> - <ul class="algorithmslist"></ul> - </div> - </div> - <div class="warnings" style="display:none"> - <p class="experiments">Sucessfully Published the report</p> - <ul class="experimentslist"></ul> - </div> - - <div class="errors" style="display:none"> - <p class="errors">Some errors occured while attempting to publish the report:</p> - <ul class="errorslist"></ul> - </div> -</div> diff --git a/beat/web/reports/templates/reports/dialogs/report_remove_experiment.html b/beat/web/reports/templates/reports/dialogs/report_remove_experiment.html deleted file mode 100644 index 04f837d2ae2fa97f3ebe71169ca86bac21ccc3a1..0000000000000000000000000000000000000000 --- a/beat/web/reports/templates/reports/dialogs/report_remove_experiment.html +++ /dev/null @@ -1,41 +0,0 @@ -{% comment %} - * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ - * Contact: beat.support@idiap.ch - * - * This file is part of the beat.web module of the BEAT platform. - * - * Commercial License Usage - * Licensees holding valid commercial BEAT licenses may use this file in - * accordance with the terms contained in a written agreement between you - * and Idiap. For further information contact tto@idiap.ch - * - * Alternatively, this file may be used under the terms of the GNU Affero - * Public License version 3 as published by the Free Software and appearing - * in the file LICENSE.AGPL included in the packaging of this file. - * The BEAT platform is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU Affero Public License along - * with the BEAT platform. If not, see http://www.gnu.org/licenses/. -{% endcomment %} -<div id="{{ dialog_id }}" class="report_remove_experiment" title="Report" style="display:none"> - <p class="explanation">Remove experiment from report</p> - - - <div class="explanation_text"> - <p class="experiments"> - 1) This will permanently remove the experiment from your current report and reload the report.</p> - <p>2) Unsaved modifications will be lost. If you have modifications, click on "Cancel" and "Save" the report first.</p> - <p>Do you wish to proceed?</p> - </div> - <div class="warnings" style="display:none"> - <p class="experiments">Sucessfully removed the experiment</p> - <ul class="experimentslist"></ul> - </div> - - <div class="errors" style="display:none"> - <p class="errors">Some errors occured while attempting to remove the experiment:</p> - <ul class="errorslist"></ul> - </div> -</div> diff --git a/beat/web/reports/templates/reports/panels/experiment_table.html b/beat/web/reports/templates/reports/panels/experiment_table.html deleted file mode 100644 index 615fca30cb3b919e95b0124732ee41b89c56d480..0000000000000000000000000000000000000000 --- a/beat/web/reports/templates/reports/panels/experiment_table.html +++ /dev/null @@ -1,143 +0,0 @@ -{# NOTE: This is a modified version of the experiments app's "table" panel #} -{% comment %} -* Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ -* Contact: beat.support@idiap.ch -* -* This file is part of the beat.web module of the BEAT platform. -* -* Commercial License Usage -* Licensees holding valid commercial BEAT licenses may use this file in -* accordance with the terms contained in a written agreement between you -* and Idiap. For further information contact tto@idiap.ch -* -* Alternatively, this file may be used under the terms of the GNU Affero -* Public License version 3 as published by the Free Software and appearing -* in the file LICENSE.AGPL included in the packaging of this file. -* The BEAT platform is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. -* -* You should have received a copy of the GNU Affero Public License along -* with the BEAT platform. If not, see http://www.gnu.org/licenses/. -{% endcomment %} -{% load experiment_tags %} - -{% if objects %} -<div ng-controller='GroupsController as ctrl'> - <div class="row" > - <div class="col-sm-12"> - <div class="scrollable table-responsive"> - <table id="{{ panel_id }}" class="table table-hover table-condensed object-list experiment-list"> - <thead> - <tr> - {% if not report_number and owner and report_status == 'Editable' %} - <th class='delete'></th> - {% endif %} - <th class="attestation"></th> - <th class="privacy"></th> - <th class="status"></th> - <th class="date">Updated</th> - <th>Name</th> - <th class="datasets">Databases/Protocols</th> - <th class="analyzers">Analyzers</th> - </tr> - </thead> - <tbody> - {% for obj in objects %} - {% with obj.get_status_display as status %} - <tr class="{{ status }}"> - {% if not report_number and owner and report_status == 'Editable' %} - <td class="delete"> - <input - name='ctrl.expNamesToRemove[]' - type="checkbox" - value="{{ obj.fullname }}" - ng-checked="ctrl.expNamesToRemove.indexOf('{{ obj.fullname }}') > -1" - ng-click="ctrl.toggleExpName('{{ obj.fullname }}')" - > - </td> - {% endif %} - <td class="attestation"> - {% if obj.attestation %} - <a class="icon-link" href="{% url 'attestations:view' obj.attestation.number %}" title="{% if obj.attestation.locked %}Locked{% else %}Attested{% endif %} (click to view)" data-toggle="tooltip" data-placement="top"> - {% if obj.attestation.locked %} - <span class="icon-locked fa-stack"> - <i class="fa fa-certificate fa-stack-2x"></i> - <i class="fa fa-lock fa-stack-1x fa-inverse"></i> - </span> - {% else %} - <i class="icon-attested fa fa-certificate"></i> - {% endif %} - </a> - {% endif %} - </td> - <td class="privacy"> - <a title="{{ obj.get_sharing_display }}" data-toggle="tooltip" data-placement="top"> - {% if obj.get_sharing_display == 'Private' %} - <i class="fa fa-user fa-2x"></i> - {% elif obj.get_sharing_display == 'Shared' %} - <i class="fa fa-users fa-2x"></i> - {% else %} - <i class="fa fa-globe fa-2x"></i> - {% endif %} - </a> - </td> - <td class="status"> - <a title="{{ status }}" data-toggle="tooltip" data-placement="top"> - {% if status == 'Done' %} - <i class="icon-done fa fa-check fa-2x"></i> - {% elif status == 'Scheduled' %} - <i class="icon-scheduled fa fa-calendar-check-o fa-2x"></i> - {% elif status == 'Pending' %} - <i class="icon-pending fa fa-play fa-2x"></i> - {% elif status == 'Failed' %} - <i class="icon-failed fa fa-bug fa-2x"></i> - {% elif status == 'Canceling' %} - <i class="icon-canceling fa fa-power-off fa-2x"></i> - {% else %} - <i class="icon-running fa fa-refresh fa-spin fa-2x"></i> - {% endif %} - </a> - </td> - {% if obj.end_date %} - <td class="date">{{ obj.end_date|date }}</td> - {% elif obj.start_date %} - <td class="date">{{ obj.start_date|date }}</td> - {% else %} - <td class="date">{{ obj.creation_date|date }}</td> - {% endif %} - <td class="name"><a href="{{ obj.get_absolute_url }}" data-toggle="tooltip" data-placement="top" title="Click to view">{{ obj.fullname }}</a></td> - <td class="datasets">{{ obj.databases_and_protocols|join:"," }}</td> - <td class="analyzers">{{ obj.analyzers|join:"," }}</td> - </tr> - {% endwith %} - {% endfor %} - </tbody> - </table> - </div> - </div><!-- col --> - </div><!-- row --> - {% if not report_number and owner and report_status == 'Editable' %} - <div> - <button - ng-disabled='ctrl.expNamesToRemove.length == 0' - class='btn btn-danger' - ng-click="ctrl.removeExperiments()"> - Remove Selected Experiments - </button> - </div> - {% endif %} -</div> -{% else %} <!-- if objects --> -<div class="row"> - <div class="col-sm-12 not-found"> - <i class="fa fa-warning fa-lg"></i> You have <strong>not added any experiments</strong> in this report yet. You may add experiments from <a href="{{ URL_PREFIX }}/experiments/{{ request.user.username }}/">any experiment list page</a> to unlock editing features for this report. - </div> -</div><!-- row --> -{% endif %} <!-- if objects --> - -{% csrf_token %} - -{% if not request.user.is_anonymous %} -{% report_script panel_id "master-report-checkbox" "report-checkbox" "add-to-report" %} -{% endif %} diff --git a/beat/web/reports/templates/reports/report.html b/beat/web/reports/templates/reports/report.html index a5eb70ed21fd7e60082e419ba60675ce84b8eaa5..ea2701a7d577111b2eab4370dc32c9bea6ecef0f 100644 --- a/beat/web/reports/templates/reports/report.html +++ b/beat/web/reports/templates/reports/report.html @@ -201,8 +201,6 @@ {% save_as_dialog "save_as_dialog" %} {% smart_selector "smart_selector" %} {% smart_selector "smart_selector_detail" %} -{% report_lock "report_lock" %} -{% report_publish "report_publish" %} <script type="text/javascript"> var smart_selector = new beat.ui.SmartSelector('smart_selector'); diff --git a/beat/web/reports/templatetags/report_tags.py b/beat/web/reports/templatetags/report_tags.py index 4fd790f01f2f2d5f8ecb0aa0be58665eda52dc72..427402f92f05c34c50714050f733276f47679359 100644 --- a/beat/web/reports/templatetags/report_tags.py +++ b/beat/web/reports/templatetags/report_tags.py @@ -188,42 +188,3 @@ def report_deletion(id): register.inclusion_tag('ui/contribution_deletion.html')(report_deletion) - - -#-------------------------------------------------- - - -def report_lock(id): - return { 'dialog_id': id, - 'URL_PREFIX': settings.URL_PREFIX - } - - -register.inclusion_tag('reports/dialogs/report_lock.html')(report_lock) - - -#-------------------------------------------------- - - -def report_publish(id): - return { 'dialog_id': id, - 'URL_PREFIX': settings.URL_PREFIX - } - - -register.inclusion_tag('reports/dialogs/report_publish.html')(report_publish) - - -#-------------------------------------------------- - - -@register.inclusion_tag('reports/panels/experiment_table.html', takes_context=True) -def experiment_table(context, objects, owner, report_number, id, status): - return dict( - request=context['request'], - objects=objects, - owner=owner, - panel_id=id, - report_number=report_number, - report_status=status - )