</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
<field name="description" placeholder="Description..."/>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</page>
</notebook>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers" help="Followers of this salesteam follow automatically all opportunities related to this salesteam."/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</group>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
</group>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
</div>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</group>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</group>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
<field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..."/>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
<field name="description" placeholder="Feedback of interviews..."/>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
<field name="description"/>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</group>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"
- options='{"thread_level": 1}'/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'/>
</div>
</form>
</field>
<field name="arch" type="xml">
<xpath expr="//sheet" position="after">
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"
- options='{"thread_level": 1}'/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'/>
</div>
</xpath>
</field>
box-sizing: border-box;
}
.openerp .oe_mail {
- display: inline-block;
+ display: block;
position: relative;
- width: 720px;
margin: 0px;
}
.openerp .oe_mail .oe_thread{
position: relative;
display: inline-block;
padding-top: 4px;
- width: 120px;
+ width: 160px;
float: right;
}
/* b) THE FOLLOWERS */
.openerp .oe_followers .oe_follower_title{
margin-top: 4px;
+ margin-bottom: 4px;
+ display: inline;
+}
+.openerp .oe_followers .oe_invite{
+ float: right;
}
.openerp .oe_followers .oe_partner {
height: 32px;
/* ----------- FORM INTEGRATION ------------ */
- /* Nothing to do yay! */
+.openerp .oe_record_thread{
+ display: block;
+ margin-right: 180px;
+}
/* ----------- INBOX INTEGRATION ----------- */
.openerp .oe_mail_wall .oe_mail{
margin: 16px;
+ width: 720px;
}
init: function() {
this._super.apply(this, arguments);
this.image = this.node.attrs.image || 'image_small';
- this.title = this.node.attrs.title || 'Followers';
this.comment = this.node.attrs.help || false;
this.displayed_nb = this.node.attrs.displayed_nb || 10;
this.ds_model = new session.web.DataSetSearch(this, this.view.model);
self.message_is_follower = (_.indexOf(self.get('value'), pid) != -1);
}).pipe(self.proxy('display_generic'));
},
-
+ _format_followers: function(count){
+ console.log('FORMAT FOLLWERS :',count);
+ function _t(str){return str;}
+ var str = '';
+ if(count <= 0){
+ str = _t('No followers');
+ }else if(count === 1){
+ str = _t('One follower');
+ }else{
+ str = ''+count+' '+_t('followers');
+ }
+ console.log('URGH:',str);
+ return str;
+ },
/* Display generic info about follower, for people not having access to res_partner */
display_generic: function () {
var self = this;
var node_user_list = this.$('.oe_follower_list').empty();
- // format content: Followers (You and 0 other) // Followers (3)
- var content = this.title;
- if (this.message_is_follower) {
- content += ' (You and ' + (this.get('value').length-1) + ' other)';
- }
- else {
- content += ' (' + this.get('value').length + ')'
- }
- this.$('.oe_follower_title').html(content);
+ this.$('.oe_follower_title').html(this._format_followers(this.get('value').length));
},
/** Display the followers */
this.message_is_follower = this.set_is_follower(records);
// clean and display title
var node_user_list = this.$('.oe_follower_list').empty();
- this.$('.oe_follower_title').html(this.title + ' (' + records.length + ')');
+ this.$('.oe_follower_title').html(this._format_followers(records.length));
// truncate number of displayed followers
truncated = records.splice(0, this.displayed_nb);
_(truncated).each(function (record) {
Template used to display the communication history in documents
form view.
-->
- <span t-name="mail.record_thread" class="oe_record_thread">
+ <div t-name="mail.record_thread" class="oe_record_thread">
<div class="oe_mail-placeholder">
</div>
- </span>
+ </div>
<t t-name="mail.thread">
<div t-attf-class="oe_thread #{widget.root?'oe_root_thread':''}"/>
<t t-if="widget.comment">
<h5 class="oe_comment"><t t-raw="widget.comment"/></h5>
</t>
- <button type="button" class="oe_invite"><span>Invite</span></button>
- <t t-if="widget.title">
- <h4 class='oe_follower_title'><t t-raw="widget.title"/></h4>
- </t>
+ <h4 class='oe_follower_title'>Followers</h4>
+ <a href='#' class="oe_invite">Invite others</a>
<div class="oe_follower_list"></div>
</div>
</page>
</notebook>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers" help="Follow this project to automatically follow all related tasks and issues."/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</xpath>
</data>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</xpath>
</data>