Redesign of activity stream
Part of blueprint review-punchcard Change-Id: Iacff003c85d0dd262e8ae7a3065f144827cab94b
This commit is contained in:
parent
b9b8ca91a6
commit
ba5d16c463
@ -48,7 +48,7 @@ METRIC_TO_RECORD_TYPE = {
|
||||
}
|
||||
|
||||
DEFAULT_RECORDS_LIMIT = 10
|
||||
DEFAULT_STATIC_ACTIVITY_SIZE = 50
|
||||
DEFAULT_STATIC_ACTIVITY_SIZE = 100
|
||||
|
||||
|
||||
def get_default(param_name):
|
||||
|
@ -167,6 +167,20 @@ div#right_list_wrapper {
|
||||
line-height: 135%;
|
||||
}
|
||||
|
||||
.activity {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.activity h3 {
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
.activity b {
|
||||
color: red;
|
||||
}
|
||||
.activity .message {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a[href^="https://blueprints"]:after {
|
||||
content: "↗";
|
||||
opacity: 0.3;
|
||||
|
3
dashboard/static/js/jqplot.canvasAxisLabelRenderer.min.js
vendored
Normal file
3
dashboard/static/js/jqplot.canvasAxisLabelRenderer.min.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/* jqPlot 1.0.7r1224 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||
jsDate | (c) 2010-2013 Chris Leonello
|
||||
*/(function(a){a.jqplot.CanvasAxisLabelRenderer=function(b){this.angle=0;this.axis;this.show=true;this.showLabel=true;this.label="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="11pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);if(b.angle==null&&this.axis!="xaxis"&&this.axis!="x2axis"){this.angle=-90}var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisLabelRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisLabelRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisLabelRenderer.prototype.draw=function(c,f){if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css({position:"absolute"});this._elem.addClass("jqplot-"+this.axis+"-label");e=null;return this._elem};a.jqplot.CanvasAxisLabelRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery);
|
@ -11,7 +11,7 @@
|
||||
{% set show_module_contribution = (module) and (not user_id) %}
|
||||
{% set show_contribution = (show_user_contribution) or (show_module_contribution) %}
|
||||
{% set show_user_profile = (user_id) %}
|
||||
{% set show_module_profile = (module) %}
|
||||
{% set show_module_profile = (module) and (not user_id) and (not company) %}
|
||||
{% set show_top_mentors_options = (metric == 'tm_marks') %}
|
||||
{% set show_review_ratio = (metric in ['marks', 'tm_marks']) %}
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
{% else %}
|
||||
|
||||
{% for item in activity %}
|
||||
<div style="margin-bottom: 1em;">
|
||||
<div class="activity">
|
||||
<div style='float: left; '>
|
||||
{% if show_gravatar %}
|
||||
<img src="{{ item.gravatar }}">
|
||||
@ -57,11 +57,14 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 80px;">
|
||||
<div style="font-weight: bold;">{{ item.date_str}}</div>
|
||||
<div style="font-weight: bold;">{{ item.author_name }} ({{ item.company_name }})</div>
|
||||
<div style="margin-left: 86px;">
|
||||
|
||||
{% if item.record_type == "commit" %}
|
||||
<div style='font-weight: bold;'>Commit “{{ item.subject }}” to {{ item.module }}</div>
|
||||
|
||||
<h3>{{ item.date_str}} — commit “{{item.subject}}” to {{ item.module }}</h3>
|
||||
|
||||
<div>Author: <a href="{{ item.user_id }}">{{ item.author_name }}</a> ({{ item.company_name }})</div>
|
||||
|
||||
<div class="message">{{ item.message | safe }}</div>
|
||||
<div><span style="color: green">+<span>{{ item.lines_added }}</span></span>
|
||||
<span style="color: blue">- <span>{{ item.lines_deleted }}</span></span>
|
||||
@ -70,21 +73,45 @@
|
||||
<div style='font-weight: bold; color: red;'>Commit corrected:
|
||||
<span>{{ item.correction_comment }}</span></div>
|
||||
{% endif %}
|
||||
|
||||
{% elif item.record_type == "mark" %}
|
||||
<div style='font-weight: bold;'>Review “{{item.subject}}” in {{ item.module }}</div>
|
||||
<div>Patch submitted by <a href="{{ item.parent_user_id }}">{{ item.parent_author_name }}</a></div>
|
||||
|
||||
<h3>{{ item.date_str}} — review “{{item.subject}}” in {{ item.module }}</h3>
|
||||
|
||||
<div>Patch submitted by: <a href="{{ item.parent_user_id }}">{{ item.parent_author_name }}</a> ({{ item.parent_company_name }})</div>
|
||||
<div>Change Id: <a href="{{item.url}}">{{item.review_id}}</a></div>
|
||||
<div style="color: {% if item.value > 0 %} green {% else %} blue {% endif %}">
|
||||
{{item.description}}: <span class="review_mark">{{item.value}}</span></div>
|
||||
|
||||
{% elif item.record_type == "review" %}
|
||||
<div style='font-weight: bold;'>Patch “{{item.subject}}” in {{ item.module }}</div>
|
||||
|
||||
<h3>{{ item.date_str}} — patch “{{item.subject}}” posted into {{ item.module }}</h3>
|
||||
|
||||
<div>Author: <a href="/report/users/{{ item.user_id }}">{{ item.author_name }}</a> ({{ item.company_name }})</div>
|
||||
<div>Current Status: {{ item.status }}</div>
|
||||
<div>URL: <a href="{{item.url}}">{{item.url}}</a></div>
|
||||
<div>Change Id: <a href="{{item.url}}">{{item.id}}</a></div>
|
||||
|
||||
{% elif item.record_type == "email" %}
|
||||
<div style='font-weight: bold;'>Email “{{item.subject}}”</div>
|
||||
|
||||
<h3>{{ item.date_str}} — email “{{item.subject}}”</h3>
|
||||
|
||||
<div>Author: <a href="/report/users/{{ item.user_id }}">{{ item.author_name }}</a> ({{ item.company_name }})</div>
|
||||
{% if item.body %}
|
||||
<div class="message">{{ item.body|safe }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% elif item.record_type in ["bpd", "bpc"] %}
|
||||
|
||||
<h3>{{ item.date_str}} — blueprint “{{item.title}}” in {{ item.module }}</h3>
|
||||
|
||||
<div>Author: <a href="/report/users/{{ item.user_id }}">{{ item.author_name }}</a> ({{ item.company_name }})</div>
|
||||
<div>Launchpad: <a href="https://blueprints.launchpad.net/{{ item.module }}/+spec/{{ item.name }}">https://blueprints.launchpad.net/{{ item.module }}/+spec/{{ item.name }}</a></div>
|
||||
<div>Report: {{ item.blueprint_link | safe}}</div>
|
||||
{% if item.summary %}
|
||||
<div class="message">{{ item.summary|safe }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% extends "reports/base_report.html" %}
|
||||
|
||||
{% block title %}
|
||||
Blueprint {{ blueprint.title }} detailed report
|
||||
Blueprint “{{ blueprint.title }}” report
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user