@ -1,5 +1,22 @@
<openerp >
<openerp >
<!-- We add the css stylesheet -->
<!-- Add menu entries -->
<data noupdate= "1" >
<record id= "menu_work_irregular" model= "website.menu" >
<field name= "name" > Shifts Irregular</field>
<field name= "url" > /shift_irregular_worker</field>
<field name= "parent_id" ref= "website.main_menu" />
<field name= "sequence" type= "int" > 50</field>
</record>
<record id= "menu_work_regular" model= "website.menu" >
<field name= "name" > Shifts Regular</field>
<field name= "url" > /shift_template_regular_worker</field>
<field name= "parent_id" ref= "website.main_menu" />
<field name= "sequence" type= "int" > 51</field>
</record>
</data>
<!-- Add the css stylesheet -->
<template id= "assets_frontend" name= "beesdoo_website_shift_website_assets"
<template id= "assets_frontend" name= "beesdoo_website_shift_website_assets"
inherit_id="website.assets_frontend">
inherit_id="website.assets_frontend">
<xpath expr= "." position= "inside" >
<xpath expr= "." position= "inside" >
@ -8,21 +25,82 @@
</xpath>
</xpath>
</template>
</template>
<!-- Task template page -->
<template id= "task_template" name= "Task template for regular worker" >
<!-- Available Tasks Templates for Regular Workers -->
<template
id="task_template"
name="Available Tasks Templates for Regular Workers"
page="True">
<t t-call= "website.layout" >
<t t-call= "website.layout" >
<div class= "oe_structure" />
<section class= "wrap" >
<div class= "container" >
<div class= "container" >
<h1 > Available Tasks Templates for Regular Workers</h1>
<div class= "row" >
<div class= "col-md-12" >
<h1 class= "text-center" >
Available Tasks Templates for Regular Workers
</h1>
</div>
</div>
</div>
</section>
<div class= "oe_structure" />
<section class= "wrap" >
<div class= "container" >
<div class= "row" >
<div class= "col-md-12" >
<p class= "text-center" >
<p class= "text-center" >
Subscribe via the member office or via <a href= "mailto:membre@bees-coop.be" > membre@bees-coop.be</a>
Subscribe via the member office or via
<a href= "mailto:volant@bees-coop.be" > volant@bees-coop.be</a>
</p>
</p>
</div>
</div>
</div>
</section>
<div class= "oe_structure" />
<table class= "table table-striped" >
<section class= "wrap" >
<div class= "container" >
<div class= "row" >
<p class= "visible-xs text-center" >
<span class= "label label-warning" > NSC</span> : This flag tells you that the shift needs a Super Co-operator
</p>
<div class= "visible-xs" t-foreach= "task_templates" t-as= "template" >
<ul class= "list-group" >
<li class= "list-group-item" >
<t t-esc= "template.planning_id.name" /> :
<t t-esc= "template.day_nb_id.name" />
<t t-esc= 'float_to_time(template.start_time)' /> -
<t t-esc= 'float_to_time(template.end_time)' />
<span class= "label label-warning pull-right"
t-if="not template.super_coop_id">
NSC
</span>
</li>
<li class= "list-group-item" >
<t t-esc= "template.task_type_id.name" />
<span class= "badge"
t-if="template.remaining_worker > 0">
<t t-esc= "template.remaining_worker" /> space(s)
</span>
<span class= "badge"
t-if="template.remaining_worker == 0">
full
</span>
</li>
</ul>
</div>
<table class= "hidden-xs table table-striped" >
<thead >
<thead >
<tr >
<tr >
<th > Week</th>
<th > Week</th>
<th > Task Template</th>
<th class= "hidden-sm" > Task Template</th>
<th > Day</th>
<th > Day</th>
<th > Time</th>
<th > Time</th>
<th > Type of Task</th>
<th > Type of Task</th>
@ -37,7 +115,7 @@
<td >
<td >
<t t-esc= "template.planning_id.name" />
<t t-esc= "template.planning_id.name" />
</td>
</td>
<td >
<td class= "hidden-sm" >
<t t-esc= "template.name" />
<t t-esc= "template.name" />
</td>
</td>
<td >
<td >
@ -65,28 +143,79 @@
</t>
</t>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>
</section>
</t>
</t>
</template>
</template>
<!-- Shift page -->
<template id= "shift_template" name= "Shift for irregular worker" >
<!-- Available shifts for irregular workers -->
<template
id="shift_template"
name="Available Shifts for Irregular Workers"
page="True">
<t t-call= "website.layout" >
<t t-call= "website.layout" >
<div class= "oe_structure" />
<section class= "wrap" >
<div class= "container" >
<div class= "container" >
<h1 > Available Shifts for Irregular Workers</h1>
<div class= "row" >
<div class= "col-md-12" >
<h1 class= "text-center" >
Available Shifts for Irregular Workers
</h1>
</div>
</div>
</div>
</section>
<div class= "oe_structure" />
<section class= "wrap" >
<div class= "container" >
<div class= "row" >
<div class= "col-md-12" >
<p class= "text-center" >
<p class= "text-center" >
Subscribe via <a href= "mailto:volant@bees-coop.be" > volant@bees-coop.be</a>
Subscribe via <a href= "mailto:volant@bees-coop.be" > volant@bees-coop.be</a>
</p>
</p>
</div>
</div>
</div>
</section>
<div class= "oe_structure" />
<table class= "table table-striped" >
<section class= "wrap" >
<div class= "container" >
<div class= "row" >
<div class= "visible-xs" t-foreach= "shift_templates" t-as= "shift_and_count" >
<t t-set= "count" t-value= "shift_and_count[0]" />
<t t-set= "shift" t-value= "shift_and_count[1]" />
<ul class= "list-group" >
<li class= "list-group-item" >
<t t-esc= "time.strftime('%A %d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))" />
<span t-field= "shift.start_time" t-field-options= '{"format": "HH:mm"}' /> -
<span t-field= "shift.end_time" t-field-options= '{"format": "HH:mm"}' />
</li>
<li class= "list-group-item" >
<t t-esc= "shift.task_type_id.name" />
<span class= "badge" >
<t t-esc= "count" /> space(s)
</span>
</li>
</ul>
</div>
<table class= "hidden-xs table table-striped" >
<thead >
<thead >
<tr >
<tr >
<th > Day</th>
<th > Day</th>
<th > Date</th>
<th > Date</th>
<th > Time</th>
<th > Time</th>
<th > Shift</th>
<th class= "hidden-sm" > Shift</th>
<th > Type of Shift</th>
<th > Type of Shift</th>
<th class= "text-center" > Available Spaces</th>
<th class= "text-center" > Available Spaces</th>
</tr>
</tr>
@ -106,7 +235,7 @@
<span t-field= "shift.start_time" t-field-options= '{"format": "HH:mm"}' /> -
<span t-field= "shift.start_time" t-field-options= '{"format": "HH:mm"}' /> -
<span t-field= "shift.end_time" t-field-options= '{"format": "HH:mm"}' />
<span t-field= "shift.end_time" t-field-options= '{"format": "HH:mm"}' />
</td>
</td>
<td >
<td class= "hidden-sm" >
<t t-esc= "shift.task_template_id.name" />
<t t-esc= "shift.task_template_id.name" />
</td>
</td>
<td >
<td >
@ -119,7 +248,10 @@
</t>
</t>
</tbody>
</tbody>
</table>
</table>
</div>
</div> <!-- row -->
</div> <!-- container -->
</section>
</t>
</t>
</template>
</template>
</openerp>
</openerp>