public function index() { $GLOBALS['phpgw_info']['flags']['app_header'] = lang('notes') . ': ' . lang('list notes'); $notes_list = $this->bonotes->read(); $link_data = array('menuaction' => 'notes.uinotes.index'); $content = array(); foreach ($notes_list as $note) { $words = explode(' ', phpgw::strip_html($note['content']), 10); $first = implode(' ', $words); if (count($words) > 10) { $first .= ' ...'; } unset($words); $content[] = array('note_id' => $note['note_id'], 'first' => $first, 'date' => $note['date'], 'owner' => $note['owner'], 'link_view' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.view', 'note_id' => $note['note_id'])), 'link_edit' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.edit', 'note_id' => $note['note_id'])), 'link_delete' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.delete', 'note_id' => $note['note_id'])), 'lang_view_statustext' => lang('view the note'), 'lang_edit_statustext' => lang('edit the note'), 'lang_delete_statustext' => lang('delete the note'), 'text_view' => lang('view'), 'text_edit' => lang('edit'), 'text_delete' => lang('delete')); } $table_header = array('sort_time_created' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'note_date', 'order' => $this->order, 'extra' => $link_data)), 'sort_note_id' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'note_id', 'order' => $this->order, 'extra' => $link_data))); $table_add = array('add_action' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.edit'))); $nm = array('start' => $this->start, 'start_record' => $this->start, 'num_records' => count($notes_list), 'all_records' => $this->bonotes->total_records, 'link_data' => $link_data); $data = array('nm_data' => $this->nextmatchs->xslt_nm($nm), 'cat_filter' => $this->cats->formatted_xslt_list(array('select_name' => 'cat_id', 'selected' => $this->cat_id, 'globals' => true, 'link_data' => $link_data)), 'filter_data' => $this->nextmatchs->xslt_filter(array('filter' => $this->filter, 'link_data' => $link_data)), 'search_data' => $this->nextmatchs->xslt_search(array('query' => $this->query, 'link_data' => $link_data)), 'table_header' => $table_header, 'values' => $content, 'table_add' => $table_add); $this->save_sessiondata(); $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('list' => $data)); }