Changeset 4969 in subversion


Ignore:
Timestamp:
Jul 26, 2011 1:21:26 PM (22 months ago)
Author:
thomasb
Message:

Always show address book name if multiple books are configured; fix styling

Location:
trunk/roundcubemail
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/addressbook/edit.inc

    r4901 r4969  
    5555 
    5656$SOURCE_ID = $source; 
    57  
     57rcmail_set_sourcename($CONTACTS); 
    5858 
    5959function rcmail_get_edit_record() 
  • trunk/roundcubemail/program/steps/addressbook/func.inc

    r4965 r4969  
    161161} 
    162162 
     163function rcmail_set_sourcename($abook) 
     164{ 
     165    global $OUTPUT; 
     166     
     167    // get address book name (for display) 
     168    if ($abook && $_SESSION['addressbooks_count'] > 1) { 
     169        $name = $abook->get_name(); 
     170        if (!$name && $source == 0) { 
     171            $name = rcube_label('personaladrbook'); 
     172        } 
     173        $OUTPUT->set_env('sourcename', $name); 
     174    } 
     175} 
     176 
    163177 
    164178function rcmail_directory_list($attrib) 
  • trunk/roundcubemail/program/steps/addressbook/show.inc

    r4892 r4969  
    3535 
    3636// get address book name (for display) 
    37 if ($_SESSION['addressbooks_count'] > 1) { 
    38     $name = $CONTACTS->get_name(); 
    39     if (!$name && $source == 0) { 
    40         $name = rcube_label('personaladrbook'); 
    41     } 
    42     $OUTPUT->set_env('sourcename', $name); 
    43 } 
     37rcmail_set_sourcename($CONTACTS); 
    4438 
    4539// return raw photo of the given contact 
  • trunk/roundcubemail/skins/default/addressbook.css

    r4958 r4969  
    391391  color: #666; 
    392392  font-size: 10px; 
    393   margin-left: 2px; 
    394 } 
     393  margin: -5px 0 8px 2px; 
     394} 
  • trunk/roundcubemail/skins/default/templates/contactadd.html

    r4901 r4969  
    1111<div id="contact-details" class="boxcontent"> 
    1212<form name="editform" method="post" action="./"> 
    13   <div id="sourcename" style="height: 20px"> 
    14     <roundcube:label name="addressbook" />: <roundcube:object name="sourceselector" class="hint" id="sourceselect" /> 
    15   </div> 
     13  <roundcube:if condition="strlen(env:sourcename)" /> 
     14    <div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:object name="sourceselector" class="hint" id="sourceselect" /></div> 
     15  <roundcube:endif /> 
    1616  <div id="contactphoto"> 
    1717    <roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" /> 
  • trunk/roundcubemail/skins/default/templates/contactedit.html

    r4424 r4969  
    1111<div id="contact-details" class="boxcontent"> 
    1212<form name="editform" method="post" action="./"> 
     13  <roundcube:if condition="strlen(env:sourcename)" /> 
     14    <div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:var name="env:sourcename" /></div> 
     15  <roundcube:endif /> 
    1316  <div id="contactphoto"> 
    1417    <roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" /> 
Note: See TracChangeset for help on using the changeset viewer.