diff --git a/addressbook/inc/class.addressbook_favorite_portlet.inc.php b/addressbook/inc/class.addressbook_favorite_portlet.inc.php
new file mode 100644
index 0000000000..09d7d7c392
--- /dev/null
+++ b/addressbook/inc/class.addressbook_favorite_portlet.inc.php
@@ -0,0 +1,107 @@
+context['template'] = 'addressbook.index.rows';
+ $this->context['sel_options'] = array();
+ foreach($ui->content_types as $tid => $data)
+ {
+ $this->context['sel_options']['tid'][$tid] = $data['name'];
+ }
+ error_log(array2string($this->nm_settings['col_filter']));
+ $this->nm_settings += array(
+ 'get_rows' => 'addressbook.addressbook_ui.get_rows',
+ // Use a different template so it can be accessed from client side
+ 'template' => 'addressbook.index.rows',
+ 'default_cols' => 'type,n_fileas_n_given_n_family_n_family_n_given_org_name_n_family_n_given_n_fileas,'.
+ 'business_adr_one_countrycode_adr_one_postalcode,tel_work_tel_cell_tel_home,url_email_email_home',
+ );
+ }
+
+ public function exec($id = null, etemplate_new &$etemplate = null)
+ {
+ $ui = new addressbook_ui();
+ $this->context['sel_options']['filter'] = $this->context['sel_options']['owner'] = $ui->get_addressbooks(EGW_ACL_READ,lang('All'));
+ $this->context['sel_options']['filter2'] = $ui->get_lists(EGW_ACL_READ,array('' => lang('none')));
+ $this->nm_settings['actions'] = $ui->get_actions($this->nm_settings['col_filter']['tid'], $this->nm_settings['org_view']);
+
+ parent::exec($id, $etemplate);
+ }
+ /**
+ * Here we need to handle any incoming data. Setup is done in the constructor,
+ * output is handled by parent.
+ *
+ * @param type $id
+ * @param etemplate_new $etemplate
+ */
+ public static function process($values = array())
+ {
+ parent::process($values);
+ $ui = new addressbook_ui();
+ if (is_array($values) && !empty($values['nm']['action']))
+ {
+ if (!count($values['nm']['selected']) && !$values['nm']['select_all'])
+ {
+ egw_framework::message(lang('You need to select some entries first'));
+ }
+ else
+ {
+ // Some processing to add values in for links and cats
+ $multi_action = $values['nm']['action'];
+ $success = $failed = $action_msg = null;
+ if ($ui->action($values['nm']['action'],$values['nm']['selected'],$values['nm']['select_all'],
+ $success,$failed,$action_msg,$values['do_email'] ? 'email' : 'index',$msg,$values['nm']['checkboxes']))
+ {
+ $msg .= lang('%1 contact(s) %2',$success,$action_msg);
+ egw_json_response::get()->apply('egw.message',array($msg,'success'));
+ foreach($values['nm']['selected'] as &$id)
+ {
+ $id = 'addressbook::'.$id;
+ }
+ // Directly request an update - this will get addressbook tab too
+ egw_json_response::get()->apply('egw.dataRefreshUIDs',array($values['nm']['selected']));
+ }
+ elseif(is_null($msg))
+ {
+ $msg .= lang('%1 entries %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed);
+ egw_json_response::get()->apply('egw.message',array($msg,'error'));
+ }
+ elseif($msg)
+ {
+ $msg .= "\n".lang('%1 entries %2, %3 failed.',$success,$action_msg,$failed);
+ egw_json_response::get()->apply('egw.message',array($msg,'error'));
+ }
+ unset($values['nm']['action']);
+ unset($values['nm']['select_all']);
+ }
+ }
+ }
+ }
\ No newline at end of file
diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php
index 708e96ad1f..5ac1394327 100644
--- a/addressbook/inc/class.addressbook_ui.inc.php
+++ b/addressbook/inc/class.addressbook_ui.inc.php
@@ -349,7 +349,7 @@ class addressbook_ui extends addressbook_bo
* @param string $org_view=null
* @return array see nextmatch_widget::get_actions()
*/
- private function get_actions($tid_filter=null, $org_view=null)
+ public function get_actions($tid_filter=null, $org_view=null)
{
// we have no org view (view of one org has context menu like regular "add contacts" view, as it shows contacts
if (!isset($this->org_views[(string) $org_view]))
diff --git a/addressbook/templates/default/index.rows.xet b/addressbook/templates/default/index.rows.xet
new file mode 100644
index 0000000000..7ee22b05a8
--- /dev/null
+++ b/addressbook/templates/default/index.rows.xet
@@ -0,0 +1,175 @@
+
+
+