Skip to content
Snippets Groups Projects
Commit dc421b50 authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh
Browse files

add basic controller & html for groups panel

parent 322aea16
No related branches found
No related tags found
1 merge request!223Reports overhaul
/*
* 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/.
*/
// this controller handles the 'groups' partial, where groups of experiments are managed
angular.module('reportApp').controller('GroupsController', ['$scope', 'ReportService', function ($scope, ReportService){
let vm = this;
vm.test = 'test';
}]);
{% 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/.
* 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 ui_tags %}
{% with object.get_status_display as status %}
<div class="row">
<div class="col-sm-12">
<div class="panel-group" id="information-accordion" role="tablist" aria-multiselectable="true">
<div class="col-sm-12">
<div class="panel-group" id="information-accordion" role="tablist" aria-multiselectable="true">
{# DOCUMENTATION DISPLAY/EDITOR #}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="docs-heading">
<h4 class="panel-title">
<a {% if owner %}class="collapsed" {%endif%}role="button" data-toggle="collapse" data-parent="#docs-heading" href="#collapse-docs" aria-expanded="{% if owner %}false{% else %}true{% endif %}" aria-controls="collapse-docs">Documentation{% if not object.description %} <i class="fa fa-warning"></i>{% endif %}</a>
</h4>
</div>{# panel-heading #}
<div id="collapse-docs" class="panel-collapse collapse{% if not owner %} in{% endif %}" role="tabpanel" aria-labelledby="docs-heading">
<div class="panel-body">
{% if status == 'Editable' and owner %}
{% doc_editor object 'api_reports:object' %}
{% else %}
{% doc_editor object 'api_reports:object' False %}
{% endif %}
</div>{# panel-body #}
</div>{# collapse #}
</div>{# panel #}
{# DOCUMENTATION DISPLAY/EDITOR #}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="docs-heading">
<h4 class="panel-title">
<a {% if owner %}class="collapsed" {%endif%}role="button" data-toggle="collapse" data-parent="#docs-heading" href="#collapse-docs" aria-expanded="{% if owner %}false{% else %}true{% endif %}" aria-controls="collapse-docs">Documentation{% if not object.description %} <i class="fa fa-warning"></i>{% endif %}</a>
</h4>
</div>{# panel-heading #}
<div id="collapse-docs" class="panel-collapse collapse{% if not owner %} in{% endif %}" role="tabpanel" aria-labelledby="docs-heading">
<div class="panel-body">
{% if status == 'Editable' and owner %}
{% doc_editor object 'api_reports:object' %}
{% else %}
{% doc_editor object 'api_reports:object' False %}
{% endif %}
</div>{# panel-body #}
</div>{# collapse #}
</div>{# panel #}
{% if status != 'Locked' %}
<div class="panel panel-default" ng-if="report.experiments.length != 0" >
<div class="panel-heading" role="tab" id="info-heading">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#info-heading" href="#collapse-info" aria-expanded="true" aria-controls="collapse-info">Configuration</a>
</h4>
</div>{# panel-heading #}
<div id="collapse-info" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="info-heading">
<div class="panel-body">
<myreportinfo urlprefix={{URL_PREFIX}}></myreportinfo>
</div>{# panel-body #}
</div>{# collapse #}
</div>{# panel #}
{% endif %}
{# GROUPS DISPLAY/EDITOR #}
<div id='groups' class='panel panel-default' ng-controller='GroupsController as groups'>
<div id="groups-heading" class="panel-heading" role="tab">
<h4 class="panel-title">
<a
{% if owner %}class="collapsed" {%endif%}
role="button"
data-toggle="collapse"
data-parent="#groups-heading"
href="#collapse-groups"
aria-expanded="{% if owner %}false{% else %}true{% endif %}"
aria-controls="collapse-groups">
Groups
</a>
</h4>
</div>
<div id="collapse-groups"
class="panel-collapse collapse{% if not owner %} in{% endif %}"
role="tabpanel"
aria-labelledby="groups-heading">
<div class="panel-body">
{$ groups.test $}
</div>
</div>
</div>
</div>{# panel-group #}
<div ng-if="report.experiments.length != 0" class="alert alert-success"{% if not owner or status != 'Editable' %}style="display:none;"{% endif %}>
<a class="btn btn-success btn-sm add_item" data-toggle="tooltip" data-placement="bottom" title="Add item" addreportitem><i class="fa fa-plus fa-lg"></i> Add a report item</a>
</div>
<div ng-if="report.experiments.length == 0" class="alert alert-warning"{% if not owner or status != 'Editable' %}style="display:none;"{% endif %}>
<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/{{ object.author.username }}/">any experiment list page</a> to unlock editing features for this report.
</div>
{% if status != 'Locked' %}
<div class="panel panel-default" ng-if="report.experiments.length != 0" >
<div class="panel-heading" role="tab" id="info-heading">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#info-heading" href="#collapse-info" aria-expanded="true" aria-controls="collapse-info">Configuration</a>
</h4>
</div>{# panel-heading #}
<div id="collapse-info" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="info-heading">
<div class="panel-body">
<myreportinfo urlprefix={{URL_PREFIX}}></myreportinfo>
</div>{# panel-body #}
</div>{# collapse #}
</div>{# panel #}
{% endif %}
{# DISPLAYED TABLES AND FIGURES #}
<div class="panel-group" id="space-for-report-items" role="tablist" aria-multiselectable="true">
</div>
</div>{# panel-group #}
<div ng-if="report.experiments.length != 0" class="alert alert-success"{% if not owner or status != 'Editable' %}style="display:none;"{% endif %}>
<a class="btn btn-success btn-sm add_item" data-toggle="tooltip" data-placement="bottom" title="Add item" addreportitem><i class="fa fa-plus fa-lg"></i> Add a report item</a>
</div>
<div ng-if="report.experiments.length == 0" class="alert alert-warning"{% if not owner or status != 'Editable' %}style="display:none;"{% endif %}>
<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/{{ object.author.username }}/">any experiment list page</a> to unlock editing features for this report.
</div>
</div>{# col-sm-12 #}
{# DISPLAYED TABLES AND FIGURES #}
<div class="panel-group" id="space-for-report-items" role="tablist" aria-multiselectable="true">
</div>
</div>{# col-sm-12 #}
</div>{# row #}
{% endwith %}
{% csrf_token %}
......
......@@ -70,11 +70,18 @@
<script src="{% fingerprint "reports/js/download.js" %}" type="text/javascript" charset="utf-8"></script>
<script src="{% fingerprint "reports/app/app.js" %}" type="text/javascript" charset="utf-8"></script>
<script src="{% fingerprint "reports/app/app.config.js" %}" type="text/javascript" charset="utf-8"></script>
<!-- controllers -->
<script src="{% fingerprint "reports/app/controllers/reportController.js" %}" type="text/javascript" charset="utf-8"></script>
<script src="{% fingerprint "reports/app/controllers/groupsController.js" %}" type="text/javascript" charset="utf-8"></script>
<!-- factories -->
<script src="{% fingerprint "reports/app/factories/reportFactory.js" %}" type="text/javascript" charset="utf-8"></script>
<script src="{% fingerprint "reports/app/factories/experimentFactory.js" %}" type="text/javascript" charset="utf-8"></script>
<script src="{% fingerprint "reports/app/factories/plotterFactory.js" %}" type="text/javascript" charset="utf-8"></script>
<script src="{% fingerprint "reports/app/factories/dataFactory.js" %}" type="text/javascript" charset="utf-8"></script>
<!-- services -->
<script src="{% fingerprint "reports/app/services/reportService.js" %}" type="text/javascript" charset="utf-8"></script>
<!-- directives
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment