Always show address book name if multiple books are configured; fix styling
| | |
| | | } |
| | | |
| | | $SOURCE_ID = $source; |
| | | |
| | | rcmail_set_sourcename($CONTACTS); |
| | | |
| | | function rcmail_get_edit_record() |
| | | { |
| | |
| | | return $list[key($list)]['id']; |
| | | } |
| | | |
| | | function rcmail_set_sourcename($abook) |
| | | { |
| | | global $OUTPUT; |
| | | |
| | | // get address book name (for display) |
| | | if ($abook && $_SESSION['addressbooks_count'] > 1) { |
| | | $name = $abook->get_name(); |
| | | if (!$name && $source == 0) { |
| | | $name = rcube_label('personaladrbook'); |
| | | } |
| | | $OUTPUT->set_env('sourcename', $name); |
| | | } |
| | | } |
| | | |
| | | |
| | | function rcmail_directory_list($attrib) |
| | | { |
| | |
| | | } |
| | | |
| | | // get address book name (for display) |
| | | if ($_SESSION['addressbooks_count'] > 1) { |
| | | $name = $CONTACTS->get_name(); |
| | | if (!$name && $source == 0) { |
| | | $name = rcube_label('personaladrbook'); |
| | | } |
| | | $OUTPUT->set_env('sourcename', $name); |
| | | } |
| | | rcmail_set_sourcename($CONTACTS); |
| | | |
| | | // return raw photo of the given contact |
| | | if ($RCMAIL->action == 'photo') { |
| | |
| | | { |
| | | color: #666; |
| | | font-size: 10px; |
| | | margin-left: 2px; |
| | | margin: -5px 0 8px 2px; |
| | | } |
| | |
| | | <div id="contact-title" class="boxtitle"><roundcube:label name="addcontact" /></div> |
| | | <div id="contact-details" class="boxcontent"> |
| | | <form name="editform" method="post" action="./"> |
| | | <div id="sourcename" style="height: 20px"> |
| | | <roundcube:label name="addressbook" />: <roundcube:object name="sourceselector" class="hint" id="sourceselect" /> |
| | | </div> |
| | | <roundcube:if condition="strlen(env:sourcename)" /> |
| | | <div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:object name="sourceselector" class="hint" id="sourceselect" /></div> |
| | | <roundcube:endif /> |
| | | <div id="contactphoto"> |
| | | <roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" /> |
| | | <div class="formlinks"> |
| | |
| | | <div id="contact-title" class="boxtitle"><roundcube:label name="editcontact" /></div> |
| | | <div id="contact-details" class="boxcontent"> |
| | | <form name="editform" method="post" action="./"> |
| | | <roundcube:if condition="strlen(env:sourcename)" /> |
| | | <div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:var name="env:sourcename" /></div> |
| | | <roundcube:endif /> |
| | | <div id="contactphoto"> |
| | | <roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" /> |
| | | <div class="formlinks"> |