Hi,
Attached, is the patch for displaying quotas for IMAP users.
Regards,
Aury
Index: program/include/main.inc
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/program/include/main.inc,v
retrieving revision 1.37
diff -r1.37 main.inc
962a963
> 'quotadisplay' => 'rcmail_quota_display',
Index: program/include/rcube_imap.inc
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/program/include/rcube_imap.inc,v
retrieving revision 1.26
diff -r1.26 rcube_imap.inc
1058a1059,1066
> // added by Nuny
> /*
> * Get quota
> */
> function get_quota() {
> $result = iil_C_GetQuota($this->conn);
> return sprintf("%.2fMB / %.2fMB (%.0f%%)", $result["used"] / 1000.0, $result["total"] / 1000.0, $result["percent"]);
> }
Index: program/js/app.js
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/program/js/app.js,v
retrieving revision 1.31
diff -r1.31 app.js
2647a2648,2654
> // replace content of quota display
> this.set_quota = function(text)
> {
> if (this.gui_objects.quotadisplay)
> this.gui_objects.quotadisplay.innerHTML = text;
> };
>
Index: program/steps/mail/check_recent.inc
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/program/steps/mail/check_recent.inc,v
retrieving revision 1.2
diff -r1.2 check_recent.inc
33c33,34
<
---
> $commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota());
>
47c48
< ?>
\ No newline at end of file
---
> ?>
Index: program/steps/mail/func.inc
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/program/steps/mail/func.inc,v
retrieving revision 1.25
diff -r1.25 func.inc
546a547,565
> function rcmail_quota_display($attrib) {
> global $IMAP, $OUTPUT, $JS_OBJECT_NAME;
>
> if (!$attrib['id'])
> $attrib['id'] = 'rcmquotadisplay';
>
> $OUTPUT->add_script(sprintf("%s.gui_object('quotadisplay', '%s');", $JS_OBJECT_NAME, $attrib['id']));
>
> // allow the following attributes to be added to the <span> tag
> $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id'));
>
>
> $out = '<span' . $attrib_str . '>';
> $out .= $IMAP->get_quota();
> $out .= '</span>';
> return $out;
> }
>
>
1407c1426
< ?>
\ No newline at end of file
---
> ?>
Index: program/steps/mail/move_del.inc
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/program/steps/mail/move_del.inc,v
retrieving revision 1.5
diff -r1.5 move_del.inc
76c76
<
---
> $commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota());
90c90
< ?>
\ No newline at end of file
---
> ?>
Index: skins/default/mail.css
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/skins/default/mail.css,v
retrieving revision 1.14
diff -r1.14 mail.css
751c751,755
<
---
> #rcmquotadisplay
> {
> color: #999999;
> font-size: 11px;
> }
Index: skins/default/templates/mail.html
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/skins/default/templates/mail.html,v
retrieving revision 1.9
diff -r1.9 mail.html
53c53,54
< <roundcube:button command="select-none" label="none" classAct="active" />
---
> <roundcube:button command="select-none" label="none" classAct="active" />
> Quota: <roundcube:object name="quotaDisplay" />