Verified Commit 78307aea authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

feat: add overlay for questions progress bar. closes #109

parent 91d49d98
Pipeline #331991 passed with stages
in 7 minutes and 39 seconds
......@@ -317,5 +317,8 @@ OVERLAYS = {
'issue_send': [
'issue-message',
'issue-attachments'
],
'project_questions': [
'project-questions-progress'
]
}
......@@ -289,8 +289,12 @@ VENDOR['bootstrap']['font'] = [
}
]
PROJECT_SEND_ISSUE = False
PROJECT_QUESTIONS_AUTOSAVE = False
PROJECT_SEND_ISSUE = True
EMAIL_RECIPIENTS_CHOICES = [
('request@eresearch.uni-goettingen.de', 'eRA Support')
]
PROJECT_QUESTIONS_AUTOSAVE = True
# from https://github.com/rdmorganiser/rdmo/blob/master/rdmo/core/settings.py -> the order
OVERLAYS = {
......@@ -312,5 +316,8 @@ OVERLAYS = {
'issue_send': [
'issue-message',
'issue-attachments'
],
'project_questions': [
'project-questions-progress'
]
}
<div class="overlay" id="project-questions-progress-overlay"
data-title="Fortschritt"
data-placement="left auto">
Dieser Fortschrittsbalken zeigt an, wie viele Fragen aus der Gesamtzahl an Fragen
in diesem Katalog schon für dieses Projekt beantwortet wurden.
{% include 'overlays/buttons.html'%}
</div>
\ No newline at end of file
<div class="overlay" id="project-questions-progress-overlay"
data-title="Progress"
data-placement="left auto">
This bar displays how many questions out of the total questions
in this catalogue have already been answered for this project.
{% include 'overlays/buttons.html'%}
</div>
\ No newline at end of file
{% extends 'core/page.html' %}
{% load static %}
{% load compress %}
{% load i18n %}
{% load core_tags %}
{% block head %}
<base href="{% url 'project_questions' project.id %}" />
{% vendor 'angular' %}
{% vendor 'codemirror' %}
{% vendor 'moment' %}
{% vendor 'bootstrap-datepicker' %}
{% vendor 'fuse' %}
{% compress css %}
<link rel="stylesheet" href="{% static 'projects/css/project_questions.scss' %}" type="text/x-scss" />
<link rel="stylesheet" href="{% static 'overlays/css/overlays.scss' %}" type="text/x-scss" />
{% for widget in widgets %}
{% for scss_file in widget.scss_files %}
<link rel="stylesheet" href="{% static scss_file %}" type="text/x-scss" />
{% endfor %}
{% endfor %}
{% endcompress %}
{% compress js %}
<script type="text/javascript" src="{% static 'core/js/core.js' %}" ></script>
<script type="text/javascript" src="{% static 'projects/js/project_questions/app.js' %}" ></script>
<script type="text/javascript" src="{% static 'projects/js/project_questions/directives.js' %}" ></script>
<script type="text/javascript" src="{% static 'projects/js/project_questions/services.js' %}" ></script>
<script type="text/javascript" src="{% static 'projects/js/project_questions/controllers.js' %}" ></script>
<script type="text/javascript" src="{% static 'overlays/js/overlays.js' %}" ></script>
{% for widget in widgets %}
{% for js_file in widget.js_files %}
<script type="text/javascript" src="{% static js_file %}" ></script>
{% endfor %}
{% endfor %}
{% endcompress %}
<script>
$(document).ready(function() {
initOverlays('project_questions');
$('[data-toggle="tooltip"]').tooltip()
});
</script>
{% endblock %}
{% block bodyattr %} ng-app="project_questions" ng-controller="QuestionsController" ng-init="service.init({{ project.id }})" {% endblock %}
{% block sidebar %}
{% include 'projects/project_questions_sidebar.html' %}
{% endblock %}
{% block page %}
{% include 'projects/project_questions_head.html' %}
<div class="project-questions-form" ng-show="service.questionset.id" ng-cloak>
<h2>
{$ service.questionset.section.title $} / {$ service.questionset.title $}
</h2>
<div class="help-text" ng-bind-html="service.questionset.help"></div>
<div ng-if="service.questionset.is_collection">
{% include 'projects/project_questions_questionset_head.html' %}
</div>
<div class="questions" ng-show="service.valuesets"
ng-repeat="valueset in service.valuesets[service.questionset.id][service.set_prefix] | orderBy:'set_index'">
<div class="row" ng-show="valueset.set_index == service.set_index">
<div ng-repeat="element in service.questionset.elements"
ng-include src="'element.html'"></div>
</div>
</div>
{% include 'projects/project_questions_buttons.html' %}
</div>
<div class="project-questions-form" ng-show="service.questionset && !service.questionset.id">
<div ng-show="service.questionset.error">
{% include 'projects/project_questions_error.html' %}
</div>
<div ng-hide="service.questionset.error">
{% include 'projects/project_questions_done.html' %}
</div>
</div>
<script type="text/ng-template" id="element.html">
{% include 'projects/project_questions_element.html' %}
</script>
{% include 'projects/project_questions_modal_form_valuesets.html' %}
{% include 'projects/project_questions_modal_delete_valuesets.html' %}
{% render_lang_template 'projects/overlays/project_questions_progress' %}
{% endblock %}
{% load i18n %}
<div class="progress project-progress" id="project-questions-progress">
<div class="progress-bar" role="progressbar" style="width: {$ service.progress.ratio * 100 $}%;">
<span ng-show="service.progress.ratio > 0.25">
{% blocktrans trimmed with values='{$ service.progress.values $}' total='{$ service.progress.total $}' %}
{{ values }} of {{ total }}
{% endblocktrans %}
</span>
</div>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment