summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2013-09-24 15:44:37 +0200
committerMilo Casagrande <milo@ubuntu.com>2013-09-24 15:44:37 +0200
commit7285cc7df102617cfcdc9b47a63ef3b477f1a080 (patch)
tree1162bf01ba7eb3c0298e0f113624641dc2d11d84
parentba71283d06a4ff454e24313f368e1b2091724794 (diff)
downloadroadmap-7285cc7df102617cfcdc9b47a63ef3b477f1a080.tar.gz
Fixed mixed line endings, moved CSS into base template, added login template in base one.
Change-Id: I7c607615dd079d0e4349b65a513a33072e773391
-rw-r--r--roadmap/templates/roadmap/base.html106
-rw-r--r--roadmap/templates/roadmap/index.html528
-rw-r--r--roadmap/templates/roadmap/roadmap.html692
-rw-r--r--roadmap/templates/roadmap/status.html486
-rw-r--r--roadmap/templatetags/aggregate.py46
5 files changed, 930 insertions, 928 deletions
diff --git a/roadmap/templates/roadmap/base.html b/roadmap/templates/roadmap/base.html
index cc2f5c5..75ae6a4 100644
--- a/roadmap/templates/roadmap/base.html
+++ b/roadmap/templates/roadmap/base.html
@@ -1,51 +1,55 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.5 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/variant-multi.css" title="Variant Multi" media="all" />
- {% block css_include %}
- {% endblock %}
-
- {% block js_include %}
- {% endblock %}
- <title>{% block title %}{% endblock %}</title>
-</head>
-
-<body>
-<div id="containerfull"><!-- Use"containerfull" for 100% width. For fixed width, use "container980", "container760" or "container600" (the number is the layout width in pixels). -->
- <div style="background-color: #FFF; padding: 10px 10px 0px;">
- {% block tools %}{% endblock %}
- <div class="clear">&nbsp;</div>
- </div>
- <div id="header">
- <h1><a href="/">{% block headertitle %}{% endblock %}</a></h1>
- {% block header %}{% endblock %}
- </div>
- <div id="feature">
- {% block feature %}{% endblock %}
- <div class="clear">&nbsp;</div>
- </div>
- <div id="main">
- <div id="sidebar">
- {% block sidebar %}{% endblock %}
- </div>
- <div id="content" class="stdcontent">
- {% block main_content %}{% endblock %}
- </div>
- <div class="clear">&nbsp;</div>
- </div>
-
- <div id="footer">
- <div id="footersections">
- {% block footer %}{% endblock %}
- <div class="clear">&nbsp;</div>
- </div>
- </div>
-
- <div id="credits">
- <p>&copy; 2012 Your Name<br />
- <span class="small">Template design by <a href="http://andreasviklund.com/">Andreas Viklund</a><br />Best hosted at <a href="https://www.svenskadomaner.se/?ref=mall&amp;ling=en" title="Svenska Domäner AB">www.svenskadomaner.se</a></span></p>
- </div>
-</div>
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.5 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/variant-multi.css" title="Variant Multi" media="all" />
+ {% block css_include %}
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/timeline.css">
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/roadmap.css">
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/base.css">
+ {% endblock %}
+
+ {% block js_include %}
+ <script type="text/javascript" src="http://www.google.com/jsapi"></script>
+ <script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.9.1.js"></script>
+ <script type="text/javascript" src="{{ STATIC_URL }}js/timeline.js"></script>
+ {% endblock %}
+ <title>{% block title %}{% endblock %}</title>
+</head>
+
+<body>
+{% block login %}
+{% include "roadmap/login.html" %}
+{% endblock %}
+<!-- Use"containerfull" for 100% width. For fixed width, use "container980", "container760" or "container600" (the number is the layout width in pixels). -->
+<div id="containerfull">
+ <div style="background-color: #FFF; padding: 10px 10px 0px;">
+ {% block tools %}{% endblock %}
+ <div class="clear">&nbsp;</div>
+ </div>
+ <div id="header">
+ <h1><a href="/">{% block headertitle %}{% endblock %}</a></h1>
+ {% block header %}{% endblock %}
+ </div>
+ <div id="feature">
+ {% block feature %}{% endblock %}
+ <div class="clear">&nbsp;</div>
+ </div>
+ <div id="main">
+ <div id="sidebar">
+ {% block sidebar %}{% endblock %}
+ </div>
+ <div id="content" class="stdcontent">
+ {% block main_content %}{% endblock %}
+ </div>
+ <div class="clear">&nbsp;</div>
+ </div>
+ <div id="footer">
+ <div id="footersections">
+ {% block footer %}{% endblock %}
+ <div class="clear">&nbsp;</div>
+ </div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/roadmap/templates/roadmap/index.html b/roadmap/templates/roadmap/index.html
index 9f7f468..77b63a1 100644
--- a/roadmap/templates/roadmap/index.html
+++ b/roadmap/templates/roadmap/index.html
@@ -1,266 +1,262 @@
-{% extends 'roadmap/base.html' %}
-
-{% block headertitle %}Status{% endblock %}
-
-{% block css_include %}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/timeline.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/roadmap.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/base.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/ui.slider.extras.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/redmond/jquery-ui-1.7.1.custom.css"/>
-<style type="text/css">
- /*p { clear:both; }*/
- form { margin: 0 3em;}
- fieldset { border:0; margin-top: 1em;}
- label {font-weight: normal; float: left; margin-right: .5em; font-size: 1.1em;}
- select {margin-right: 1em; float: left;}
- .ui-slider {clear: both; top: 1em;}
- </style>
-{% endblock %}
-
-{% block js_include %}
-{% load aggregate %}
-<script type="text/javascript" src="http://www.google.com/jsapi"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/timeline.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.9.1.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/highcharts.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/modules/exporting.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/ui/jquery-ui.js"></script>
-<!-- status chart -->
-<script type="text/javascript">
-$(function () {
- $('#overall').highcharts({
- chart: {
- type: 'bar',
- spacingLeft: 20
- },
- title: {
- text: 'Cards by category'
- },
- xAxis: {
- categories: ['Status'],
- labels: {
- rotation: -90,
- style: {
- color: (Highcharts.theme) || '#4d759e',
- fontWeight: 'bold'
- }
- }
- },
- yAxis: {
- title: {
- text: 'Number of cards'
- }
- },
- legend: {
- align: 'right',
- x: -70,
- verticalAlign: 'top',
- y: 20,
- floating: true,
- backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
- borderColor: '#CCC',
- borderWidth: 1,
- shadow: false
- },
- plotOptions: {
- series: {
- animation: false,
- events: {
- legendItemClick: function () {
- return false;
- }
- }
- }
- },
- series: [
- {% for status in statuses reversed %}
- {
- name: '{{ status.name }}',
- color: '{{ status.status_style.color }}',
- data: [{% card_aggregate project aggrby=status aggrbyname='status' from=from_milestone to=to_milestone %}]
- }{% if not forloop.last %},{% endif %}
- {% endfor %}
- ]
- });
-});
-</script>
-
-<!-- burndown chart -->
-<script type="text/javascript">
-$(function () {
- $('#burndown').highcharts({
- chart: {
- zoomType: 'xy'
- },
- title: {
- text: 'Burndown'
- },
- xAxis: {
- categories: [
- {% for snapshot in burndown_categories %}
- '{{ snapshot }}'{% if not forloop.last %},{% endif %}
- {% endfor %}
- ],
- labels: {
- rotation: -45,
- align: 'right',
- step: {{ tick_interval }},
- style: {
- fontSize: '13px',
- fontFamily: 'Verdana, sans-serif'
- }
- }
- },
- yAxis: [{
- min: 0,
- title: {
- text: 'Total blueprints'
- }
- },{
- min: 0,
- title: {
- text: null
- }
- }
- ],
- legend: {
- align: 'right',
- x: -70,
- verticalAlign: 'top',
- y: 20,
- floating: true,
- backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
- borderColor: '#CCC',
- borderWidth: 1,
- shadow: false
- }/*,
- tooltip: {
- formatter: function() {
- return '<b>'+ this.x +'</b><br/>'+
- this.series.name +': '+ this.y +'<br/>'+
- 'Total: '+ this.point.stackTotal;
- }
- }*/,
- plotOptions: {
- column: {
- stacking: 'normal',
- animation: false,
- events: {
- legendItemClick: function () {
- return false;
- }
- }
- },
- spline: {
- animation: false,
- marker: {enabled: false},
- events: {
- legendItemClick: function () {
- return false;
- }
- },
- enableMouseTracking: false
- }
- },
- series: [
- {% for serie_name, serie_value in burndown_series %}
- {
- name: '{{ serie_name }}',
- data: {{ serie_value }},
- type: 'column'
- },
- {% endfor %}
- {
- name: 'burndown line',
- data: {{ burndown_line }},
- type: 'spline'
- }
- ]
- });
- });
-
-</script>
-{% endblock %}
-
-{% block header %}
-{% if current_tag %}
-<h2>{{ current_tag }}</h2>
-{% else %}
-<h2>from {{ from_milestone.name }} to {{ to_milestone.name }}</h2>
-{% endif %}
-{% endblock %}
-
-{% block header_menu %}
-<ul>
- {% if current_tag %}
- {% for p in components %}
- <li><a href="/roadmap/{{ p.id }}/{{ current_tag }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
- {% endfor %}
- {% endif %}
-</ul>
-{% endblock %}
-
-{% block main_content %}
-<h1>Linaro Status</h1>
-
- <div id="overall" width="100%" style="margin: 10px" title="Overall status">Overall status</div>
-
- <div id="burndown" width="100%" style="margin: 10px" title="Burndown chart">Burndown chart</div>
-
- <div style="margin: 10px;">
- <table class="roadmaptable" width="100%">
- <tr class="first">
- <th>&nbsp;</th>
- {% for status in statuses %}
- <th> {{ status.name }}</th>
- {% endfor %}
- <th> total: </th>
- </tr>
- {% for component in components %}
- <tr class="{% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}">
- <td><a href="/status/{{ component.pk }}">{{ component.name }}</a></td>
- {% for status in statuses %}
- <td><a href="/status/{{ component.pk }}?status={{ status.pk }}">{% card_aggregate component aggrby=status aggrbyname='status' from=from_milestone to=to_milestone %}</a></td>
- {% endfor %}
- <td><a href="/status/{{ component.pk }}">{% card_aggregate component from=from_milestone to=to_milestone %}</a></td>
- </tr>
- {% endfor %}
- <tr class="last">
- <td>total:</td>
- {% for status in statuses %}
- <td>{% card_aggregate status from=from_milestone to=to_milestone %}</td>
- {% endfor %}
- <td>{% card_aggregate project from=from_milestone to=to_milestone %}</td>
- </tr>
- </table>
- </div>
-
-
-{% endblock %}
-
-{% block tools %}
-<div>
-<ul id="nav">
- <li>
- <a href="#">Releases</a>
- <ul>
- {% if current %}
- <li><a href="/roadmap/{{ current.id }}">Unreleased</a></li>
- {% for release in releases %}
- <li><a href="/roadmap/{{ current.id }}/{{ release.release_name }}">{{ release.release_name }}</a></li>
- {% endfor %}
- {% else %}
- <li><a href="/roadmap">Unreleased</a></li>
- {% for release in releases %}
- <li><a href="/roadmap/{{ release.release_name }}">{{ release.release_name }}</a></li>
- {% endfor %}
- {% endif %}
- </ul>
- </li>
-</ul>
-</div>
-<div style="float:right;">
-{% include "_logout.html" %}
-</div>
-{% endblock %}
+{% extends 'roadmap/base.html' %}
+
+{% block headertitle %}Status{% endblock %}
+
+{% block css_include %}
+{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/ui.slider.extras.css">
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/redmond/jquery-ui-1.7.1.custom.css"/>
+<style type="text/css">
+ /*p { clear:both; }*/
+ form { margin: 0 3em;}
+ fieldset { border:0; margin-top: 1em;}
+ label {font-weight: normal; float: left; margin-right: .5em; font-size: 1.1em;}
+ select {margin-right: 1em; float: left;}
+ .ui-slider {clear: both; top: 1em;}
+ </style>
+{% endblock %}
+
+{% block js_include %}
+{{ block.super }}
+{% load aggregate %}
+<script type="text/javascript" src="{{ STATIC_URL }}js/highcharts.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/modules/exporting.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/ui/jquery-ui.js"></script>
+<!-- status chart -->
+<script type="text/javascript">
+$(function () {
+ $('#overall').highcharts({
+ chart: {
+ type: 'bar',
+ spacingLeft: 20
+ },
+ title: {
+ text: 'Cards by category'
+ },
+ xAxis: {
+ categories: ['Status'],
+ labels: {
+ rotation: -90,
+ style: {
+ color: (Highcharts.theme) || '#4d759e',
+ fontWeight: 'bold'
+ }
+ }
+ },
+ yAxis: {
+ title: {
+ text: 'Number of cards'
+ }
+ },
+ legend: {
+ align: 'right',
+ x: -70,
+ verticalAlign: 'top',
+ y: 20,
+ floating: true,
+ backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
+ borderColor: '#CCC',
+ borderWidth: 1,
+ shadow: false
+ },
+ plotOptions: {
+ series: {
+ animation: false,
+ events: {
+ legendItemClick: function () {
+ return false;
+ }
+ }
+ }
+ },
+ series: [
+ {% for status in statuses reversed %}
+ {
+ name: '{{ status.name }}',
+ color: '{{ status.status_style.color }}',
+ data: [{% card_aggregate project aggrby=status aggrbyname='status' from=from_milestone to=to_milestone %}]
+ }{% if not forloop.last %},{% endif %}
+ {% endfor %}
+ ]
+ });
+});
+</script>
+
+<!-- burndown chart -->
+<script type="text/javascript">
+$(function () {
+ $('#burndown').highcharts({
+ chart: {
+ zoomType: 'xy'
+ },
+ title: {
+ text: 'Burndown'
+ },
+ xAxis: {
+ categories: [
+ {% for snapshot in burndown_categories %}
+ '{{ snapshot }}'{% if not forloop.last %},{% endif %}
+ {% endfor %}
+ ],
+ labels: {
+ rotation: -45,
+ align: 'right',
+ step: {{ tick_interval }},
+ style: {
+ fontSize: '13px',
+ fontFamily: 'Verdana, sans-serif'
+ }
+ }
+ },
+ yAxis: [{
+ min: 0,
+ title: {
+ text: 'Total blueprints'
+ }
+ },{
+ min: 0,
+ title: {
+ text: null
+ }
+ }
+ ],
+ legend: {
+ align: 'right',
+ x: -70,
+ verticalAlign: 'top',
+ y: 20,
+ floating: true,
+ backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
+ borderColor: '#CCC',
+ borderWidth: 1,
+ shadow: false
+ }/*,
+ tooltip: {
+ formatter: function() {
+ return '<b>'+ this.x +'</b><br/>'+
+ this.series.name +': '+ this.y +'<br/>'+
+ 'Total: '+ this.point.stackTotal;
+ }
+ }*/,
+ plotOptions: {
+ column: {
+ stacking: 'normal',
+ animation: false,
+ events: {
+ legendItemClick: function () {
+ return false;
+ }
+ }
+ },
+ spline: {
+ animation: false,
+ marker: {enabled: false},
+ events: {
+ legendItemClick: function () {
+ return false;
+ }
+ },
+ enableMouseTracking: false
+ }
+ },
+ series: [
+ {% for serie_name, serie_value in burndown_series %}
+ {
+ name: '{{ serie_name }}',
+ data: {{ serie_value }},
+ type: 'column'
+ },
+ {% endfor %}
+ {
+ name: 'burndown line',
+ data: {{ burndown_line }},
+ type: 'spline'
+ }
+ ]
+ });
+ });
+
+</script>
+{% endblock %}
+
+{% block header %}
+{% if current_tag %}
+<h2>{{ current_tag }}</h2>
+{% else %}
+<h2>from {{ from_milestone.name }} to {{ to_milestone.name }}</h2>
+{% endif %}
+{% endblock %}
+
+{% block header_menu %}
+<ul>
+ {% if current_tag %}
+ {% for p in components %}
+ <li><a href="/roadmap/{{ p.id }}/{{ current_tag }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
+ {% endfor %}
+ {% endif %}
+</ul>
+{% endblock %}
+
+{% block main_content %}
+<h1>Linaro Status</h1>
+
+ <div id="overall" width="100%" style="margin: 10px" title="Overall status">Overall status</div>
+
+ <div id="burndown" width="100%" style="margin: 10px" title="Burndown chart">Burndown chart</div>
+
+ <div style="margin: 10px;">
+ <table class="roadmaptable" width="100%">
+ <tr class="first">
+ <th>&nbsp;</th>
+ {% for status in statuses %}
+ <th> {{ status.name }}</th>
+ {% endfor %}
+ <th> total: </th>
+ </tr>
+ {% for component in components %}
+ <tr class="{% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}">
+ <td><a href="/status/{{ component.pk }}">{{ component.name }}</a></td>
+ {% for status in statuses %}
+ <td><a href="/status/{{ component.pk }}?status={{ status.pk }}">{% card_aggregate component aggrby=status aggrbyname='status' from=from_milestone to=to_milestone %}</a></td>
+ {% endfor %}
+ <td><a href="/status/{{ component.pk }}">{% card_aggregate component from=from_milestone to=to_milestone %}</a></td>
+ </tr>
+ {% endfor %}
+ <tr class="last">
+ <td>total:</td>
+ {% for status in statuses %}
+ <td>{% card_aggregate status from=from_milestone to=to_milestone %}</td>
+ {% endfor %}
+ <td>{% card_aggregate project from=from_milestone to=to_milestone %}</td>
+ </tr>
+ </table>
+ </div>
+
+
+{% endblock %}
+
+{% block tools %}
+<div>
+<ul id="nav">
+ <li>
+ <a href="#">Releases</a>
+ <ul>
+ {% if current %}
+ <li><a href="/roadmap/{{ current.id }}">Unreleased</a></li>
+ {% for release in releases %}
+ <li><a href="/roadmap/{{ current.id }}/{{ release.release_name }}">{{ release.release_name }}</a></li>
+ {% endfor %}
+ {% else %}
+ <li><a href="/roadmap">Unreleased</a></li>
+ {% for release in releases %}
+ <li><a href="/roadmap/{{ release.release_name }}">{{ release.release_name }}</a></li>
+ {% endfor %}
+ {% endif %}
+ </ul>
+ </li>
+</ul>
+</div>
+<div style="float:right;">
+{% include "_logout.html" %}
+</div>
+{% endblock %}
diff --git a/roadmap/templates/roadmap/roadmap.html b/roadmap/templates/roadmap/roadmap.html
index 672d509..4ceea51 100644
--- a/roadmap/templates/roadmap/roadmap.html
+++ b/roadmap/templates/roadmap/roadmap.html
@@ -1,352 +1,340 @@
-{% extends 'roadmap/base.html' %}
-
-{% block title %}
-{% if current %}
-{{ current.name }}
-{% endif %}
-Roadmap
-{% endblock %}
-
-{% block headertitle %}
-Roadmap
-{% endblock %}
-
-{% block header %}
-<h2>
-{% if current %}
-{{ current.name }}
-{% endif %}
-{% if release %}
-- {{ release.release_name }}
-{% else %}
-- Unreleased
-{% endif %}
-</h2>
-{% endblock %}
-
-{% block feature %}
- <div class="left">
- <h2>Statuses</h2>
- <div class="concept" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Concept</div><div class="timeline-event timeline-event-dot concept" style="position: absolute;"></div></div>
- <div class="approved" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Approved</div><div class="timeline-event timeline-event-dot approved" style="position: absolute;"></div></div>
- <div class="planning" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Planning</div><div class="timeline-event timeline-event-dot planning" style="position: absolute;"></div></div>
- <div class="development" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Engineering</div><div class="timeline-event timeline-event-dot development" style="position: absolute;"></div></div>
- <div class="released" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Delivered</div><div class="timeline-event timeline-event-dot released" style="position: absolute;"></div></div>
- </div>
-
- <div class="right">
- <h2>Symbols</h2>
- <div style="position: relative; float:left; margin-left: 20px;"><img title="ARMv7-A" src="{{ STATIC_URL }}img/32bit.png"/> ARMv7-A</div>
- <div style="position: relative; float:left; margin-left: 20px;"><img title="ARMv8-A" src="{{ STATIC_URL }}img/64bit.png"/> ARMv8-A</div>
- <div style="float:right; text-decoration:underline; color:#33f; cursor:pointer;" id="close-sidebar">open/close sidebar</div>
- </div>
-{% endblock %}
-
-{% block css_include %}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/timeline.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/roadmap.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/base.css">
-{% endblock %}
-
-{% block js_include %}
-<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
-<script type="text/javascript" src="https://www.google.com/jsapi"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/timeline.js"></script>
-
- <script type="text/javascript">
- google.load("visualization", "1");
-
- // Set callback to run when API is loaded
- google.setOnLoadCallback(drawVisualization);
- var zoomin = 10*2629740000;
- var startDate = new Date(2011, 1, 1);
- var endDate = new Date(2015, 1, 1);
- {% if epics %}
- {% for epic in epics %}
- {% if epic.is_valid_swimlane %}
- var vis{{ forloop.counter0 }};
- function createTimeline{{ forloop.counter0 }}() {
- var data = [];
- options = {
- "width": "100%",
- "height": "auto",
- "style": "dot", // optional
- {% if forloop.first %}
- "axisOnTop": true,
- {% endif %}
- "animate": false,
- "animateZoom": false,
- {% if not forloop.first and not forloop.last %}
- "showMajorLabels": false,
- "showMinorLabels" : false,
- {% endif %}
- "zoomMin": zoomin,
- "min": startDate,
- "max": endDate
- };
- {% if forloop.last and other_cards %}
- options["showMajorLabels"] = false;
- options["showMinorLabels"] = false;
- {% endif %}
-
- // Instantiate our timeline object.
- vis{{ forloop.counter0 }} = new links.Timeline(document.getElementById('{{ epic.key }}'));
- {% for card in epic.implementedby.all %}
- {% if card.is_valid %}
- data.push({
- "start": new Date("{{ card.start_date|date:'c' }}"),
- {% if card.event_type == 'ONGOING' %}
- "end": new Date(2015, 1, 1),
- {% endif %}
- "content": "<a href=\"{{ card.url }}\">{{ card.summary }}</a>",
- "editable": false,
- "className": "{{ card.style }}",
- });
- {% endif %}
- {% endfor %}
- google.visualization.events.addListener(vis{{ forloop.counter0 }}, 'rangechange', onrangechange{{ forloop.counter0 }});
-
- // Draw our timeline with the created data and options
- vis{{ forloop.counter0 }}.draw(data, options);
- }
-
- function onrangechange{{ forloop.counter0 }}() {
- var range = vis{{ forloop.counter0 }}.getVisibleChartRange();
- {% for e in epics %}
- {% if e.is_valid_swimlane %}
- {% if forloop.counter0 != forloop.parentloop.counter0 %}
- vis{{ forloop.counter0 }}.setVisibleChartRange(range.start, range.end);
- {% endif %}
- {% if forloop.last %}
- vis{{ forloop.counter }}.setVisibleChartRange(range.start, range.end);
- {% endif %}
- {% endif %}
- {% endfor %}
- }
-
- {% if forloop.last %}
- var vis{{ forloop.counter }};
- function createTimeline{{ forloop.counter }}() {
- var data = [];
- options = {
- "width": "100%",
- "height": "auto",
- "style": "dot", // optional
- "animate": false,
- "animateZoom": false,
- "zoomMin": zoomin,
- "min": startDate,
- "max": endDate
- };
-
- // Instantiate our timeline object.
- vis{{ forloop.counter }} = new links.Timeline(document.getElementById('other-cards'));
- {% for card in other_cards %}
- {% if card.is_valid %}
- data.push({
- "start": new Date("{{ card.start_date|date:'c' }}"),
- {% if card.event_type == 'ONGOING' %}
- "end": new Date(2015, 1, 1),
- {% endif %}
- "content": "<a href=\"{{ card.url }}\">{{ card.summary }}</a>",
- "editable": false,
- "className": "{{ card.style }}",
- });
- {% endif %}
- {% endfor %}
- google.visualization.events.addListener(vis{{ forloop.counter }}, 'rangechange', onrangechange{{ forloop.counter }});
-
- // Draw our timeline with the created data and options
- vis{{ forloop.counter }}.draw(data, options);
- }
-
- function onrangechange{{ forloop.counter }}() {
- var range = vis{{ forloop.counter }}.getVisibleChartRange();
- {% for e in epics %}
- {% if e.is_valid_swimlane %}
- vis{{ forloop.counter0 }}.setVisibleChartRange(range.start, range.end);
- {% endif %}
- {% endfor %}
- }
-
- {% endif %}
- {% endif %}
- {% endfor %}
-
- function drawVisualization() {
- {% for epic in epics %}
- {% if epic.is_valid_swimlane %}
- createTimeline{{ forloop.counter0 }}();
- {% if forloop.last %}
- createTimeline{{ forloop.counter }}();
- {% endif %}
- {% endif %}
- {% endfor %}
- {% for epic in epics %}
- {% if epic.is_valid_swimlane %}
- onrangechange{{ forloop.counter0 }}();
- {% if forloop.last %}
- onrangechange{{ forloop.counter }}();
- {% endif %}
- {% endif %}
- {% endfor %}
- }
- {% else %}
- <!-- No epics, but other cards present -->
- function drawVisualization() {
- var data = [];
- options = {
- "width": "100%",
- "height": "auto",
- "style": "dot", // optional
- "axisOnTop": true,
- "animate": false,
- "animateZoom": false,
- "zoomMin": 33*2629740000, // 33* month in miliseconds
- "min": new Date(2011, 1, 1),
- "max": new Date(2015, 1, 1)
- };
-
- // Instantiate our timeline object.
- timeline = new links.Timeline(document.getElementById('other-cards'));
- {% for card in other_cards %}
- //card {{ card.key }}
- //epic {{ card.is_epic }}
- //top {{ card.is_toplevel }}
- {% if card.is_valid %}
- data.push({
- "start": new Date("{{ card.start_date|date:'c' }}"),
- {% if card.event_type == 'ONGOING' %}
- "end": new Date(2015, 1, 1),
- {% endif %}
- "content": "<a href=\"{{ card.url }}\">{{ card.summary }}</a>",
- "editable": false,
- "className": "{{ card.style }}",
- });
- {% endif %}
- {% endfor %}
- timeline.draw(data, options);
- }
- {% endif %}
- </script>
- <script type="text/javascript">
- $(document).ready(function() {
- $( "#close-sidebar" ).click( function() {
- $( "#sidebar" ).toggleClass("nosidebar");
- $( "#content" ).toggleClass("stdcontent");
- $( "#content" ).toggleClass("fullcontent");
- drawVisualization();
- });
- });
- </script>
-{% endblock %}
-
-{% block sidebar %}
-{% if cards %}
-<div class="sidebarbox">
- <h2>No FixVersion</h2>
- <ul class="sidemenu">
- {% for card in cards %}
- {% if not card.is_valid and not card.fix_version %}
- <li><a href="{{ card.url }}">{{ card.status.name}} - {{ card.summary }}</a></li>
- {% endif %}
- {% endfor %}
- </ul>
-</div>
-{% endif %}
-
-{% if epics %}
-<div class="sidebarbox">
- <h2>Broken Epics</h2>
- <ul class="sidemenu">
- {% for card in epics %}
- {% if not card.is_valid_swimlane %}
- <li><a href="{{ card.url }}">{{ card.summary }}</a></li>
- {% endif %}
- {% endfor %}
- </ul>
-</div>
-{% endif %}
-
-{% endblock %}
-
-{% block main_content %}
-{% load carddiff %}
-<div id="tl_container" style="overflow-x: hidden; border-right: solid #444 1px;">
-{% for epic in epics %}
- {% if epic.is_valid_swimlane %}
- {% if forloop.counter|divisibleby:2 %}
- <div style="background-color: #CCC;">
- {% else %}
- <div>
- {% endif %}
- <div style="z-index: 1000; float: left; width: 150px; overflow: hidden;">
- <a style="white-space:nowrap;" href="{{ epic.url }}">{{ epic.summary }}</a>
- {% if epic.is_v7 %}
- <br/>
- <img src="{{ STATIC_URL }}img/32bit.png" title="ARMv7-A"/>
- {% endif %}
- {% if epic.is_v8 %}
- <img src="{{ STATIC_URL }}img/64bit.png" title="ARMv8-A"/>
- {% endif %}
- </div>
- <div style="margin-left:151px" id="{{ epic.key }}"></div>
- </div>
- {% endif %}
-{% endfor %}
-{% if other_cards %}
- <div style="background-color: #ff9999;">
- <div style="z-index: 1000; float: left; width: 150px; overflow: hidden;">Other</div>
- <div style="margin-left:151px" id="other-cards"></div>
- </div>
-{% endif %}
-</div>
-{% if diff %}
-<h2>Changes since last roadmap release </h2>
-<table class="difftable" cellspacing="0" cellpadding="0" width="100%">
-<tr><th class="difftable" >Previous</th><th class="difftable">Current</th></tr>
-<tr><th class="difftable" >{{ previous.release_name }}</th><th class="difftable">&nbsp;{% if release %}{{ release.release_name }}{% endif %}</th></tr>
- {% for card in diff %}
- {% card_diff card.prev card.new %}
- {% endfor %}
-</table>
-{% endif %}
-{% endblock %}
-
-{% block tools %}
-<div>
-<ul id="nav">
- <li>
- <a href="#">Releases</a>
- <ul>
- {% if current %}
- <li><a href="/roadmap/{{ current.id }}">Unreleased</a></li>
- {% for release in releases %}
- <li><a href="/roadmap/{{ current.id }}/{{ release.release_name }}">{{ release.release_name }}</a></li>
- {% endfor %}
- {% else %}
- <li><a href="/roadmap">Unreleased</a></li>
- {% for release in releases %}
- <li><a href="/roadmap/{{ release.release_name }}">{{ release.release_name }}</a></li>
- {% endfor %}
- {% endif %}
- </ul>
- </li>
- <li>
- <a href="#">Projects</a>
- <ul>
- {% for p in components %}
- {% if current and p == current %}
- <li><a class="current" href="/roadmap/{{ p.id }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
- {% else %}
- <li><a href="/roadmap/{{ p.id }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
- {% endif %}
- {% endfor %}
- </ul>
- </li>
-</ul>
-</div>
-<div style="float:right;">
-{% include "_logout.html" %}
-</div>
-{% endblock %}
+{% extends 'roadmap/base.html' %}
+
+{% block title %}
+{% if current %}
+{{ current.name }}
+{% endif %}
+Roadmap
+{% endblock %}
+
+{% block headertitle %}
+Roadmap
+{% endblock %}
+
+{% block header %}
+<h2>
+{% if current %}
+{{ current.name }}
+{% endif %}
+{% if release %}
+- {{ release.release_name }}
+{% else %}
+- Unreleased
+{% endif %}
+</h2>
+{% endblock %}
+
+{% block feature %}
+ <div class="left">
+ <h2>Statuses</h2>
+ <div class="concept" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Concept</div><div class="timeline-event timeline-event-dot concept" style="position: absolute;"></div></div>
+ <div class="approved" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Approved</div><div class="timeline-event timeline-event-dot approved" style="position: absolute;"></div></div>
+ <div class="planning" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Planning</div><div class="timeline-event timeline-event-dot planning" style="position: absolute;"></div></div>
+ <div class="development" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Engineering</div><div class="timeline-event timeline-event-dot development" style="position: absolute;"></div></div>
+ <div class="released" style="position: relative; float:left; margin-left: 20px;"><div class="timeline-event-content">Delivered</div><div class="timeline-event timeline-event-dot released" style="position: absolute;"></div></div>
+ </div>
+
+ <div class="right">
+ <h2>Symbols</h2>
+ <div style="position: relative; float:left; margin-left: 20px;"><img title="ARMv7-A" src="{{ STATIC_URL }}img/32bit.png"/> ARMv7-A</div>
+ <div style="position: relative; float:left; margin-left: 20px;"><img title="ARMv8-A" src="{{ STATIC_URL }}img/64bit.png"/> ARMv8-A</div>
+ <div style="float:right; text-decoration:underline; color:#33f; cursor:pointer;" id="close-sidebar">open/close sidebar</div>
+ </div>
+{% endblock %}
+
+{% block js_include %}
+{{ block.super }}
+ <script type="text/javascript">
+ google.load("visualization", "1");
+
+ // Set callback to run when API is loaded
+ google.setOnLoadCallback(drawVisualization);
+ var zoomin = 10*2629740000;
+ var startDate = new Date(2011, 1, 1);
+ var endDate = new Date(2015, 1, 1);
+ {% if epics %}
+ {% for epic in epics %}
+ {% if epic.is_valid_swimlane %}
+ var vis{{ forloop.counter0 }};
+ function createTimeline{{ forloop.counter0 }}() {
+ var data = [];
+ options = {
+ "width": "100%",
+ "height": "auto",
+ "style": "dot", // optional
+ {% if forloop.first %}
+ "axisOnTop": true,
+ {% endif %}
+ "animate": false,
+ "animateZoom": false,
+ {% if not forloop.first and not forloop.last %}
+ "showMajorLabels": false,
+ "showMinorLabels" : false,
+ {% endif %}
+ "zoomMin": zoomin,
+ "min": startDate,
+ "max": endDate
+ };
+ {% if forloop.last and other_cards %}
+ options["showMajorLabels"] = false;
+ options["showMinorLabels"] = false;
+ {% endif %}
+
+ // Instantiate our timeline object.
+ vis{{ forloop.counter0 }} = new links.Timeline(document.getElementById('{{ epic.key }}'));
+ {% for card in epic.implementedby.all %}
+ {% if card.is_valid %}
+ data.push({
+ "start": new Date("{{ card.start_date|date:'c' }}"),
+ {% if card.event_type == 'ONGOING' %}
+ "end": new Date(2015, 1, 1),
+ {% endif %}
+ "content": "<a href=\"{{ card.url }}\">{{ card.summary }}</a>",
+ "editable": false,
+ "className": "{{ card.style }}",
+ });
+ {% endif %}
+ {% endfor %}
+ google.visualization.events.addListener(vis{{ forloop.counter0 }}, 'rangechange', onrangechange{{ forloop.counter0 }});
+
+ // Draw our timeline with the created data and options
+ vis{{ forloop.counter0 }}.draw(data, options);
+ }
+
+ function onrangechange{{ forloop.counter0 }}() {
+ var range = vis{{ forloop.counter0 }}.getVisibleChartRange();
+ {% for e in epics %}
+ {% if e.is_valid_swimlane %}
+ {% if forloop.counter0 != forloop.parentloop.counter0 %}
+ vis{{ forloop.counter0 }}.setVisibleChartRange(range.start, range.end);
+ {% endif %}
+ {% if forloop.last %}
+ vis{{ forloop.counter }}.setVisibleChartRange(range.start, range.end);
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ }
+
+ {% if forloop.last %}
+ var vis{{ forloop.counter }};
+ function createTimeline{{ forloop.counter }}() {
+ var data = [];
+ options = {
+ "width": "100%",
+ "height": "auto",
+ "style": "dot", // optional
+ "animate": false,
+ "animateZoom": false,
+ "zoomMin": zoomin,
+ "min": startDate,
+ "max": endDate
+ };
+
+ // Instantiate our timeline object.
+ vis{{ forloop.counter }} = new links.Timeline(document.getElementById('other-cards'));
+ {% for card in other_cards %}
+ {% if card.is_valid %}
+ data.push({
+ "start": new Date("{{ card.start_date|date:'c' }}"),
+ {% if card.event_type == 'ONGOING' %}
+ "end": new Date(2015, 1, 1),
+ {% endif %}
+ "content": "<a href=\"{{ card.url }}\">{{ card.summary }}</a>",
+ "editable": false,
+ "className": "{{ card.style }}",
+ });
+ {% endif %}
+ {% endfor %}
+ google.visualization.events.addListener(vis{{ forloop.counter }}, 'rangechange', onrangechange{{ forloop.counter }});
+
+ // Draw our timeline with the created data and options
+ vis{{ forloop.counter }}.draw(data, options);
+ }
+
+ function onrangechange{{ forloop.counter }}() {
+ var range = vis{{ forloop.counter }}.getVisibleChartRange();
+ {% for e in epics %}
+ {% if e.is_valid_swimlane %}
+ vis{{ forloop.counter0 }}.setVisibleChartRange(range.start, range.end);
+ {% endif %}
+ {% endfor %}
+ }
+
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+
+ function drawVisualization() {
+ {% for epic in epics %}
+ {% if epic.is_valid_swimlane %}
+ createTimeline{{ forloop.counter0 }}();
+ {% if forloop.last %}
+ createTimeline{{ forloop.counter }}();
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ {% for epic in epics %}
+ {% if epic.is_valid_swimlane %}
+ onrangechange{{ forloop.counter0 }}();
+ {% if forloop.last %}
+ onrangechange{{ forloop.counter }}();
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ }
+ {% else %}
+ <!-- No epics, but other cards present -->
+ function drawVisualization() {
+ var data = [];
+ options = {
+ "width": "100%",
+ "height": "auto",
+ "style": "dot", // optional
+ "axisOnTop": true,
+ "animate": false,
+ "animateZoom": false,
+ "zoomMin": 33*2629740000, // 33* month in miliseconds
+ "min": new Date(2011, 1, 1),
+ "max": new Date(2015, 1, 1)
+ };
+
+ // Instantiate our timeline object.
+ timeline = new links.Timeline(document.getElementById('other-cards'));
+ {% for card in other_cards %}
+ //card {{ card.key }}
+ //epic {{ card.is_epic }}
+ //top {{ card.is_toplevel }}
+ {% if card.is_valid %}
+ data.push({
+ "start": new Date("{{ card.start_date|date:'c' }}"),
+ {% if card.event_type == 'ONGOING' %}
+ "end": new Date(2015, 1, 1),
+ {% endif %}
+ "content": "<a href=\"{{ card.url }}\">{{ card.summary }}</a>",
+ "editable": false,
+ "className": "{{ card.style }}",
+ });
+ {% endif %}
+ {% endfor %}
+ timeline.draw(data, options);
+ }
+ {% endif %}
+ </script>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $( "#close-sidebar" ).click( function() {
+ $( "#sidebar" ).toggleClass("nosidebar");
+ $( "#content" ).toggleClass("stdcontent");
+ $( "#content" ).toggleClass("fullcontent");
+ drawVisualization();
+ });
+ });
+ </script>
+{% endblock %}
+
+{% block sidebar %}
+{% if cards %}
+<div class="sidebarbox">
+ <h2>No FixVersion</h2>
+ <ul class="sidemenu">
+ {% for card in cards %}
+ {% if not card.is_valid and not card.fix_version %}
+ <li><a href="{{ card.url }}">{{ card.status.name}} - {{ card.summary }}</a></li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+</div>
+{% endif %}
+
+{% if epics %}
+<div class="sidebarbox">
+ <h2>Broken Epics</h2>
+ <ul class="sidemenu">
+ {% for card in epics %}
+ {% if not card.is_valid_swimlane %}
+ <li><a href="{{ card.url }}">{{ card.summary }}</a></li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+</div>
+{% endif %}
+
+{% endblock %}
+
+{% block main_content %}
+{% load carddiff %}
+<div id="tl_container" style="overflow-x: hidden; border-right: solid #444 1px;">
+{% for epic in epics %}
+ {% if epic.is_valid_swimlane %}
+ {% if forloop.counter|divisibleby:2 %}
+ <div style="background-color: #CCC;">
+ {% else %}
+ <div>
+ {% endif %}
+ <div style="z-index: 1000; float: left; width: 150px; overflow: hidden;">
+ <a style="white-space:nowrap;" href="{{ epic.url }}">{{ epic.summary }}</a>
+ {% if epic.is_v7 %}
+ <br/>
+ <img src="{{ STATIC_URL }}img/32bit.png" title="ARMv7-A"/>
+ {% endif %}
+ {% if epic.is_v8 %}
+ <img src="{{ STATIC_URL }}img/64bit.png" title="ARMv8-A"/>
+ {% endif %}
+ </div>
+ <div style="margin-left:151px" id="{{ epic.key }}"></div>
+ </div>
+ {% endif %}
+{% endfor %}
+{% if other_cards %}
+ <div style="background-color: #ff9999;">
+ <div style="z-index: 1000; float: left; width: 150px; overflow: hidden;">Other</div>
+ <div style="margin-left:151px" id="other-cards"></div>
+ </div>
+{% endif %}
+</div>
+{% if diff %}
+<h2>Changes since last roadmap release </h2>
+<table class="difftable" cellspacing="0" cellpadding="0" width="100%">
+<tr><th class="difftable" >Previous</th><th class="difftable">Current</th></tr>
+<tr><th class="difftable" >{{ previous.release_name }}</th><th class="difftable">&nbsp;{% if release %}{{ release.release_name }}{% endif %}</th></tr>
+ {% for card in diff %}
+ {% card_diff card.prev card.new %}
+ {% endfor %}
+</table>
+{% endif %}
+{% endblock %}
+
+{% block tools %}
+<div>
+<ul id="nav">
+ <li>
+ <a href="#">Releases</a>
+ <ul>
+ {% if current %}
+ <li><a href="/roadmap/{{ current.id }}">Unreleased</a></li>
+ {% for release in releases %}
+ <li><a href="/roadmap/{{ current.id }}/{{ release.release_name }}">{{ release.release_name }}</a></li>
+ {% endfor %}
+ {% else %}
+ <li><a href="/roadmap">Unreleased</a></li>
+ {% for release in releases %}
+ <li><a href="/roadmap/{{ release.release_name }}">{{ release.release_name }}</a></li>
+ {% endfor %}
+ {% endif %}
+ </ul>
+ </li>
+ <li>
+ <a href="#">Projects</a>
+ <ul>
+ {% for p in components %}
+ {% if current and p == current %}
+ <li><a class="current" href="/roadmap/{{ p.id }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
+ {% else %}
+ <li><a href="/roadmap/{{ p.id }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </li>
+</ul>
+</div>
+{% endblock %}
diff --git a/roadmap/templates/roadmap/status.html b/roadmap/templates/roadmap/status.html
index c825f68..120adcf 100644
--- a/roadmap/templates/roadmap/status.html
+++ b/roadmap/templates/roadmap/status.html
@@ -1,247 +1,239 @@
-{% extends 'roadmap/base.html' %}
-
-{% block headertitle %}Status{% endblock %}
-
-{% block css_include %}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/timeline.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/roadmap.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/base.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/ui.slider.extras.css">
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/redmond/jquery-ui-1.7.1.custom.css"/>
-<style type="text/css">
- /*p { clear:both; }*/
- form { margin: 0 3em;}
- fieldset { border:0; margin-top: 1em;}
- label {font-weight: normal; float: left; margin-right: .5em; font-size: 1.1em;}
- select {margin-right: 1em; float: left;}
- .ui-slider {clear: both; top: 1em;}
- </style>
-{% endblock %}
-
-{% block js_include %}
-{% load aggregate %}
-<script type="text/javascript" src="http://www.google.com/jsapi"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/timeline.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.9.1.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/highcharts.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/modules/exporting.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/ui/jquery-ui.js"></script>
-<!-- status chart -->
-<script type="text/javascript">
-$(function () {
- $('#overall').highcharts({
- chart: {
- type: 'bar',
- spacingLeft: 20
- },
- title: {
- text: 'Cards by category {{ component.name }}'
- },
- xAxis: {
- categories: ['Status'],
- labels: {
- rotation: -90,
- style: {
- color: (Highcharts.theme) || '#4d759e',
- fontWeight: 'bold'
- }
- }
- },
- yAxis: {
- title: {
- text: 'Number of cards'
- }
- },
- legend: {
- align: 'right',
- x: -70,
- verticalAlign: 'top',
- y: 20,
- floating: true,
- backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
- borderColor: '#CCC',
- borderWidth: 1,
- shadow: false
- },
- plotOptions: {
- series: {
- animation: false,
- events: {
- legendItemClick: function () {
- return false;
- }
- }
- }
- },
- series: [
- {% for status in statuses reversed %}
- {
- name: '{{ status.name }}',
- color: '{{ status.status_style.color }}',
- data: [{% card_aggregate component aggrby=status aggrbyname='status' from=from_milestone to=to_milestone %}]
- }{% if not forloop.last %},{% endif %}
- {% endfor %}
- ]
- });
-});
-</script>
-
-<!-- burndown chart -->
-<script type="text/javascript">
-$(function () {
- $('#burndown').highcharts({
- chart: {
- zoomType: 'xy'
- },
- title: {
- text: 'Burndown {{ component.name }}'
- },
- xAxis: {
- categories: [
- {% for snapshot in burndown_categories %}
- '{{ snapshot }}'{% if not forloop.last %},{% endif %}
- {% endfor %}
- ],
- labels: {
- rotation: -45,
- align: 'right',
- step: {{ tick_interval }},
- style: {
- fontSize: '13px',
- fontFamily: 'Verdana, sans-serif'
- }
- }
- },
- yAxis: [{
- min: 0,
- title: {
- text: 'Total blueprints'
- }
- },{
- min: 0,
- title: {
- text: null
- }
- }
- ],
- legend: {
- align: 'right',
- x: -70,
- verticalAlign: 'top',
- y: 20,
- floating: true,
- backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
- borderColor: '#CCC',
- borderWidth: 1,
- shadow: false
- }/*,
- tooltip: {
- formatter: function() {
- return '<b>'+ this.x +'</b><br/>'+
- this.series.name +': '+ this.y +'<br/>'+
- 'Total: '+ this.point.stackTotal;
- }
- }*/,
- plotOptions: {
- column: {
- stacking: 'normal',
- animation: false,
- events: {
- legendItemClick: function () {
- return false;
- }
- }
- },
- spline: {
- animation: false,
- marker: {enabled: false},
- events: {
- legendItemClick: function () {
- return false;
- }
- },
- enableMouseTracking: false
- }
- },
- series: [
- {% for serie_name, serie_value in burndown_series %}
- {
- name: '{{ serie_name }}',
- data: {{ serie_value }},
- type: 'column'
- },
- {% endfor %}
- {
- name: 'burndown line',
- data: {{ burndown_line }},
- type: 'spline'
- }
- ]
- });
- });
-
-</script>
-{% endblock %}
-
-{% block header %}
-{% if current_tag %}
-<h2>{{ current_tag }}</h2>
-{% else %}
-<h2>from {{ from_milestone.name }} to {{ to_milestone.name }}</h2>
-{% endif %}
-{% endblock %}
-
-{% block header_menu %}
-<ul>
- {% if current_tag %}
- {% for p in components %}
- <li><a href="/roadmap/{{ p.id }}/{{ current_tag }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
- {% endfor %}
- {% endif %}
-</ul>
-{% endblock %}
-
-{% block main_content %}
-<h1>Linaro Status - {{ component.name }}</h1>
-<h2><a href="/roadmap/{{ component.pk }}">Roadmap</a></h2>
-
- <div id="overall" width="100%" style="margin: 10px" title="Overall status">Overall status</div>
-
- <div id="burndown" width="100%" style="margin: 10px" title="Burndown chart">Burndown chart</div>
-
- <div style="margin: 10px;">
- <ul class="status">
- {% for card in roadmap_cards %}
- <li class="status {{ card.status.status_style.class_name }}"><a href="{{ card.url }}">({{ card.key }}) {{ card.summary }}</a></li>
- {% endfor %}
- </ul>
- </div>
-
-
-{% endblock %}
-
-{% block tools %}
-<div>
-<ul id="nav">
- <li>
- <a href="#">Releases</a>
- <ul>
- {% if current %}
- <li><a href="/roadmap/{{ current.id }}">Unreleased</a></li>
- {% for release in releases %}
- <li><a href="/roadmap/{{ current.id }}/{{ release.release_name }}">{{ release.release_name }}</a></li>
- {% endfor %}
- {% else %}
- <li><a href="/roadmap">Unreleased</a></li>
- {% for release in releases %}
- <li><a href="/roadmap/{{ release.release_name }}">{{ release.release_name }}</a></li>
- {% endfor %}
- {% endif %}
- </ul>
- </li>
-</ul>
-</div>
-<div style="float:right;">
-{% include "_logout.html" %}
-</div>
-{% endblock %}
+{% extends 'roadmap/base.html' %}
+
+{% block headertitle %}Status{% endblock %}
+
+{% block css_include %}
+{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/ui.slider.extras.css">
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/redmond/jquery-ui-1.7.1.custom.css"/>
+<style type="text/css">
+ /*p { clear:both; }*/
+ form { margin: 0 3em;}
+ fieldset { border:0; margin-top: 1em;}
+ label {font-weight: normal; float: left; margin-right: .5em; font-size: 1.1em;}
+ select {margin-right: 1em; float: left;}
+ .ui-slider {clear: both; top: 1em;}
+ </style>
+{% endblock %}
+
+{% block js_include %}
+{{ block.super }}
+{% load aggregate %}
+<script type="text/javascript" src="{{ STATIC_URL }}js/highcharts.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/modules/exporting.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/ui/jquery-ui.js"></script>
+<!-- status chart -->
+<script type="text/javascript">
+$(function () {
+ $('#overall').highcharts({
+ chart: {
+ type: 'bar',
+ spacingLeft: 20
+ },
+ title: {
+ text: 'Cards by category {{ component.name }}'
+ },
+ xAxis: {
+ categories: ['Status'],
+ labels: {
+ rotation: -90,
+ style: {
+ color: (Highcharts.theme) || '#4d759e',
+ fontWeight: 'bold'
+ }
+ }
+ },
+ yAxis: {
+ title: {
+ text: 'Number of cards'
+ }
+ },
+ legend: {
+ align: 'right',
+ x: -70,
+ verticalAlign: 'top',
+ y: 20,
+ floating: true,
+ backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
+ borderColor: '#CCC',
+ borderWidth: 1,
+ shadow: false
+ },
+ plotOptions: {
+ series: {
+ animation: false,
+ events: {
+ legendItemClick: function () {
+ return false;
+ }
+ }
+ }
+ },
+ series: [
+ {% for status in statuses reversed %}
+ {
+ name: '{{ status.name }}',
+ color: '{{ status.status_style.color }}',
+ data: [{% card_aggregate component aggrby=status aggrbyname='status' from=from_milestone to=to_milestone %}]
+ }{% if not forloop.last %},{% endif %}
+ {% endfor %}
+ ]
+ });
+});
+</script>
+
+<!-- burndown chart -->
+<script type="text/javascript">
+$(function () {
+ $('#burndown').highcharts({
+ chart: {
+ zoomType: 'xy'
+ },
+ title: {
+ text: 'Burndown {{ component.name }}'
+ },
+ xAxis: {
+ categories: [
+ {% for snapshot in burndown_categories %}
+ '{{ snapshot }}'{% if not forloop.last %},{% endif %}
+ {% endfor %}
+ ],
+ labels: {
+ rotation: -45,
+ align: 'right',
+ step: {{ tick_interval }},
+ style: {
+ fontSize: '13px',
+ fontFamily: 'Verdana, sans-serif'
+ }
+ }
+ },
+ yAxis: [{
+ min: 0,
+ title: {
+ text: 'Total blueprints'
+ }
+ },{
+ min: 0,
+ title: {
+ text: null
+ }
+ }
+ ],
+ legend: {
+ align: 'right',
+ x: -70,
+ verticalAlign: 'top',
+ y: 20,
+ floating: true,
+ backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
+ borderColor: '#CCC',
+ borderWidth: 1,
+ shadow: false
+ }/*,
+ tooltip: {
+ formatter: function() {
+ return '<b>'+ this.x +'</b><br/>'+
+ this.series.name +': '+ this.y +'<br/>'+
+ 'Total: '+ this.point.stackTotal;
+ }
+ }*/,
+ plotOptions: {
+ column: {
+ stacking: 'normal',
+ animation: false,
+ events: {
+ legendItemClick: function () {
+ return false;
+ }
+ }
+ },
+ spline: {
+ animation: false,
+ marker: {enabled: false},
+ events: {
+ legendItemClick: function () {
+ return false;
+ }
+ },
+ enableMouseTracking: false
+ }
+ },
+ series: [
+ {% for serie_name, serie_value in burndown_series %}
+ {
+ name: '{{ serie_name }}',
+ data: {{ serie_value }},
+ type: 'column'
+ },
+ {% endfor %}
+ {
+ name: 'burndown line',
+ data: {{ burndown_line }},
+ type: 'spline'
+ }
+ ]
+ });
+ });
+
+</script>
+{% endblock %}
+
+{% block header %}
+{% if current_tag %}
+<h2>{{ current_tag }}</h2>
+{% else %}
+<h2>from {{ from_milestone.name }} to {{ to_milestone.name }}</h2>
+{% endif %}
+{% endblock %}
+
+{% block header_menu %}
+<ul>
+ {% if current_tag %}
+ {% for p in components %}
+ <li><a href="/roadmap/{{ p.id }}/{{ current_tag }}"><div style="overflow: hidden; width: 110px; white-space: nowrap;">{{ p.name }}</div></a></li>
+ {% endfor %}
+ {% endif %}
+</ul>
+{% endblock %}
+
+{% block main_content %}
+<h1>Linaro Status - {{ component.name }}</h1>
+<h2><a href="/roadmap/{{ component.pk }}">Roadmap</a></h2>
+
+ <div id="overall" width="100%" style="margin: 10px" title="Overall status">Overall status</div>
+
+ <div id="burndown" width="100%" style="margin: 10px" title="Burndown chart">Burndown chart</div>
+
+ <div style="margin: 10px;">
+ <ul class="status">
+ {% for card in roadmap_cards %}
+ <li class="status {{ card.status.status_style.class_name }}"><a href="{{ card.url }}">({{ card.key }}) {{ card.summary }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+
+
+{% endblock %}
+
+{% block tools %}
+<div>
+<ul id="nav">
+ <li>
+ <a href="#">Releases</a>
+ <ul>
+ {% if current %}
+ <li><a href="/roadmap/{{ current.id }}">Unreleased</a></li>
+ {% for release in releases %}
+ <li><a href="/roadmap/{{ current.id }}/{{ release.release_name }}">{{ release.release_name }}</a></li>
+ {% endfor %}
+ {% else %}
+ <li><a href="/roadmap">Unreleased</a></li>
+ {% for release in releases %}
+ <li><a href="/roadmap/{{ release.release_name }}">{{ release.release_name }}</a></li>
+ {% endfor %}
+ {% endif %}
+ </ul>
+ </li>
+</ul>
+{% endblock %}
diff --git a/roadmap/templatetags/aggregate.py b/roadmap/templatetags/aggregate.py
index 5f121e9..4cbf3ac 100644
--- a/roadmap/templatetags/aggregate.py
+++ b/roadmap/templatetags/aggregate.py
@@ -1,15 +1,32 @@
+# Copyright (C) 2013 Linaro
+#
+# This file is part of roadmap.
+#
+# roadmap is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# roadmap 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. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with roadmap. If not, see <http://www.gnu.org/licenses/>.
+
from django import template
-from django.db.models import fields
from django.utils.encoding import smart_str
register = template.Library()
+
def parse_args_kwargs_and_as_var(parser, bits):
args = []
kwargs = {}
as_var = None
-
+
bits = iter(bits)
for bit in bits:
if bit == 'as':
@@ -25,35 +42,40 @@ def parse_args_kwargs_and_as_var(parser, bits):
args.append(parser.compile_filter(arg))
return args, kwargs, as_var
+
def get_args_and_kwargs(args, kwargs, context):
out_args = [arg.resolve(context) for arg in args]
- out_kwargs = dict([(smart_str(k,'ascii'), v.resolve(context)) for k, v in kwargs.items()])
+ out_kwargs = dict([(smart_str(k, 'ascii'), v.resolve(context))
+ for k, v in kwargs.items()])
return out_args, out_kwargs
+
class CardAggregate(template.Node):
+
def __init__(self, args, kwargs, as_var):
self.args = args
self.kwargs = kwargs
self.as_var = as_var
-
+
def render(self, context):
-
+
args, kwargs = get_args_and_kwargs(self.args, self.kwargs, context)
-
- # call something with the args or kwargs here
+
+ # call something with the args or kwargs here
if hasattr(args[0], 'aggregate'):
return args[0].aggregate(**kwargs)
-
+
return ''
+
@register.tag(name="card_aggregate")
def do_card_aggregate(parser, token):
bits = token.contents.split(' ')
if len(bits) < 1:
- raise TemplateSyntaxError("'%s' takes at least one argument" % bits[0])
-
+ raise template.TemplateSyntaxError(
+ "'%s' takes at least one argument" % bits[0])
+
if len(bits) > 1:
args, kwargs, as_var = parse_args_kwargs_and_as_var(parser, bits[1:])
-
+
return CardAggregate(args, kwargs, as_var)
-