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

fix reportController div scope

parent 74695367
No related branches found
No related tags found
1 merge request!223Reports overhaul
...@@ -133,64 +133,62 @@ ...@@ -133,64 +133,62 @@
{% block content %} {% block content %}
{% if author %} <div ng-app="reportApp" ng-controller="reportController"
<div class="col-sm-12" ng-app="reportApp" ng-controller="reportController" ng-init="init('{{ author }}', '{{report_name}}', '{{ URL_PREFIX }}')"></div> {% if author and not report_number %}ng-init="init('{{ author }}', '{{report_name}}', '{{ URL_PREFIX }}')"{% endif %}
{% endif %} {% if report_number and not author %}ng-init="initWithReportNumber('{{report_number}}', '{{ URL_PREFIX }}')"{% endif %}
{% if report_number %} >
<div class="col-sm-12" ng-app="reportApp" ng-controller="reportController" ng-init="initWithReportNumber('{{report_number}}', '{{ URL_PREFIX }}')"></div> {% csrf_token %}
{% endif %} {% if report %}
{% csrf_token %} <div id="title" class="row">
<div class="{% if owner %}col-sm-9 vertical-center{% else %}col-sm-12{% endif %}"{% if owner %} onmouseover="expand_breadcrumb(this, 9, 3);" onmouseout="reset_breadcrumb(this, 9, 3);"{% endif %}>
{% if report %} {% report_breadcrumb report %}
<div id="title" class="row"> <!-- Note: keep no space between divs here! -->
<div class="{% if owner %}col-sm-9 vertical-center{% else %}col-sm-12{% endif %}"{% if owner %} onmouseover="expand_breadcrumb(this, 9, 3);" onmouseout="reset_breadcrumb(this, 9, 3);"{% endif %}> </div>{% if owner %}<div class="col-sm-3 vertical-center">
{% report_breadcrumb report %} {% report_actions report False %}
<!-- Note: keep no space between divs here! --> </div>{% endif %}
</div>{% if owner %}<div class="col-sm-3 vertical-center">
{% report_actions report False %}
</div>{% endif %}
</div> </div>
{% with report.get_status_display as status %} {% with report.get_status_display as status %}
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<p class="bs-callout bs-callout-{% if status == 'Editable' %}danger{% elif status == 'Locked' %}warning{% else %}info{% endif %}"> <p class="bs-callout bs-callout-{% if status == 'Editable' %}danger{% elif status == 'Locked' %}warning{% else %}info{% endif %}">
{% if report.short_description %} {% if report.short_description %}
<i class="fa fa-file-text"></i> {{ report.short_description }}<br/> <i class="fa fa-file-text"></i> {{ report.short_description }}<br/>
{% endif %} {% endif %}
{% ifequal request.user.username author %} {% ifequal request.user.username author %}
<i class="fa fa-arrow-circle-right"></i> Unique report id: <a href="{{ report.get_absolute_url }}" title="Use this link on your report or to share access with users and reviewers" data-toggle="tooltip" data-placement="top">{{ report.number }}</a> <span class="help">(follow link to see review/publication URL.)</span><br/> <i class="fa fa-arrow-circle-right"></i> Unique report id: <a href="{{ report.get_absolute_url }}" title="Use this link on your report or to share access with users and reviewers" data-toggle="tooltip" data-placement="top">{{ report.number }}</a> <span class="help">(follow link to see review/publication URL.)</span><br/>
{% endifequal %} {% endifequal %}
{% if report.publication_date %} {% if report.publication_date %}
<i class="fa fa-calendar-o"></i> Published: <strong>{{ report.publication_date|naturaltime }}</strong><br/> <i class="fa fa-calendar-o"></i> Published: <strong>{{ report.publication_date|naturaltime }}</strong><br/>
{% else %} {% else %}
<i class="fa fa-calendar-o"></i> Created: <strong>{{ report.creation_date|naturaltime }}</strong><br/> <i class="fa fa-calendar-o"></i> Created: <strong>{{ report.creation_date|naturaltime }}</strong><br/>
{% endif %} {% endif %}
{% if report.last_edited_date != None and not report.publication_date %} {% if report.last_edited_date != None and not report.publication_date %}
<i class="fa fa-calendar-o"></i> Last Edited: <strong>{{ report.last_edited_date|naturaltime }}</strong><br/> <i class="fa fa-calendar-o"></i> Last Edited: <strong>{{ report.last_edited_date|naturaltime }}</strong><br/>
{% endif %} {% endif %}
{% if status == 'Editable' %} {% if status == 'Editable' %}
<i class="fa fa-warning"></i> This report is <strong class="text-danger">{{ status }}</strong> (it may change in time)<br/> <i class="fa fa-warning"></i> This report is <strong class="text-danger">{{ status }}</strong> (it may change in time)<br/>
{% elif status == 'Locked' %} {% elif status == 'Locked' %}
<i class="fa fa-warning"></i> This report is <strong class="text-warning">{{ status }}</strong> (not yet published)<br/> <i class="fa fa-warning"></i> This report is <strong class="text-warning">{{ status }}</strong> (not yet published)<br/>
<i class="fa fa-calendar-o"></i> Expires in <strong>{{ report.expiration_date|naturaltime }}</strong>, on {{ report.expiration_date }} (publish it to make it permanent)<br/> <i class="fa fa-calendar-o"></i> Expires in <strong>{{ report.expiration_date|naturaltime }}</strong>, on {{ report.expiration_date }} (publish it to make it permanent)<br/>
{% endif %} {% endif %}
</p> </p>
</div>
</div> </div>
</div> {% endwith %}
{% endwith %}
{% report_viewer report owner report_number %} {% report_viewer report owner report_number %}
</div>
{% endif %} {% endif %}
{% list_selector "list_selector" %} {% list_selector "list_selector" %}
......
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