Laurent Mignon (ACSONE)
10 years ago
committed by
Tom Blauwendraat
6 changed files with 266 additions and 1230 deletions
-
5__openerp__.py
-
28project_view.xml
-
17static/src/css/web_timeline.css
-
1369static/src/js/web_timeline.js
-
75static/src/xml/web_timeline.xml
-
2views/web_timeline.xml
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="view_task_timeline" model="ir.ui.view"> |
|||
<field name="name">project.task.timeline</field> |
|||
<field name="model">project.task</field> |
|||
<field name="type">timeline</field> |
|||
<field eval="2" name="priority"/> |
|||
<field name="arch" type="xml"> |
|||
<timeline date_start="date_start" |
|||
date_stop="date_end" |
|||
progress="progress" |
|||
string="Tasks" |
|||
default_group_by="user_id" event_open_popup="true" colors="#ec7063:kanban_state=='blocked';#2ecb71:kanban_state=='done';#95a5a5:kanban_state=='normal';"> |
|||
</timeline> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_view_task" model="ir.actions.act_window"> |
|||
<field name="name">Tasks</field> |
|||
<field name="res_model">project.task</field> |
|||
<field name="view_mode">kanban,tree,form,calendar,gantt,timeline,graph</field> |
|||
<field name="search_view_id" ref="project.view_task_search_form"/> |
|||
<field name="inherit_id" ref="project.action_view_task"/> |
|||
</record> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,17 @@ |
|||
/* Button style */ |
|||
.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_timeline:after { |
|||
content: "N"; |
|||
} |
|||
.timeline-navigation-zoom-in .ui-icon{ |
|||
background: none !important; |
|||
} |
|||
|
|||
.timeline-navigation-zoom-out .ui-icon{ |
|||
background: none !important; |
|||
} |
|||
.timeline-navigation-move-left .ui-icon{ |
|||
background: none !important; |
|||
} |
|||
.timeline-navigation-move-right .ui-icon{ |
|||
background: none !important; |
|||
} |
1369
static/src/js/web_timeline.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,74 +1,7 @@ |
|||
<template> |
|||
<t t-name="TimelineView"> |
|||
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="oe_timeline_table"> |
|||
<tr> |
|||
<td width="100%"> |
|||
<div class="oe_timeline_view"> |
|||
<div class="oe_timeline_widget" /> |
|||
<div class="oe_timeline_buttons"/> |
|||
<div class="oe_timeline_qc_placeholder"/> |
|||
</div> |
|||
</td> |
|||
<td class='oe_timeline_sidebar_container'> |
|||
|
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<t t-name="TimelineView"> |
|||
<div class="oe_timeline_view"> |
|||
<div class="oe_timeline_widget" /> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="TimelineView.sidebar"> |
|||
<div class="oe_timeline_sidebar"> |
|||
<div class="oe_timeline_mini" /> |
|||
<div class="oe_timeline_filter"> |
|||
<h3><t t-esc="widget.getParent().color_string"/></h3> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
<t t-name="TimelineView.sidebar.responsible"> |
|||
<div class="oe_timeline_all_responsibles"> |
|||
<div t-foreach="filters" class="oe_timeline_responsible" > |
|||
<t t-if="filters_value.value"> <!-- don't display if no value given (or undefined) --> |
|||
<input type="checkbox" name="selection" t-att-value="filters_value.value" checked="checked" /> |
|||
<t t-if="filters_value.value == -1"> |
|||
<span><i t-attf-class="fa fa-users fa-fw cal_avatar" ></i></span> |
|||
</t> |
|||
<t t-if="(filters_value.value != -1) && filters_value.avatar_model "> |
|||
<img t-att-src="'/web/binary/image?model=' + filters_value.avatar_model + '&field=image_small&id=' + filters_value.value" class="cal_avatar"/> |
|||
</t> |
|||
<span t-attf-class="color_filter cal_opacity underline_color_#{filters_value.color}" ><t t-esc="filters_value.label" /></span> |
|||
</t> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
|
|||
<div t-name="TimelineView.buttons" class="oe_timeline_buttons"> |
|||
<t t-if="widget.options.action_buttons !== false"> |
|||
<t t-if="widget.is_action_enabled('create') && |
|||
((widget.field_widget && |
|||
(widget.field_widget.open_popup_add)) || |
|||
(!widget.field_widget))"> |
|||
<button type="button" class="oe_timeline_button_new oe_highlight"> |
|||
<t t-esc="widget.options.create_text || _t('Create')"/> |
|||
</button> |
|||
</t> |
|||
</t> |
|||
</div> |
|||
|
|||
<div t-name="TimelineView.quick_create" class="oe_timeline_quick_create openerp"> |
|||
|
|||
<div class="form-group"> |
|||
<label for='name' class='control-label'>Event summary:</label> |
|||
<input name='name' class="form-control"/> |
|||
</div> |
|||
|
|||
<t t-if="widget._buttons"> |
|||
<div class="oe_timeline_quick_create_buttons"> |
|||
<button class="openerp oe_button oe_highlight oe_timeline_quick_create_add ">Create event</button> |
|||
<button class="oe_button oe_form_button oe_link oe_timeline_quick_create_edit" ><span>Edit Event <![CDATA[]]></span></button> |
|||
</div> |
|||
</t> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</template> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue