protected function get_content() { $content = new HTMLTags_TagContent(); $content->append_tag($this->get_thead()); $content->append_tag($this->get_tbody()); return $content; }
public function get_content() { $content = new HTMLTags_TagContent(); foreach ($this->get_options() as $option) { $content->append_tag($option); } return $content; }
public function get_content() { $content = new HTMLTags_TagContent(); $content->append_str($this->question); $content->append_tag(new HTMLTags_BR()); $action_a = new HTMLTags_A($this->yes_str); $action_a->set_href($this->action); $content->append_tag($action_a); $content->append_str(' '); $cancel_a = new HTMLTags_A($this->no_str); $cancel_a->set_href($this->cancel); $content->append_tag($cancel_a); return $content; }
protected function get_content() { $content = new HTMLTags_TagContent(); $content->append_tag($this->get_caption()); $colgroups = $this->get_colgroups(); foreach ($colgroups as $colgroup) { $content->append_tag($colgroup); } $content->append_tag($this->get_thead()); $content->append_tag($this->get_tbody()); return $content; }
protected function get_content() { $content = new HTMLTags_TagContent(); # The field set. $field_set = new HTMLTags_FieldSet(); $field_set->append_tag_to_content($this->get_legend()); $inputs_list = new HTMLTags_OL(); $input_lis = $this->get_input_lis(); if (count($input_lis) > 0) { foreach ($input_lis as $input_li) { $inputs_list->add_li($input_li); } } else { throw new Exception('No inputs set in HTMLTags_SimpleOLForm!'); } $field_set->append_tag_to_content($inputs_list); $content->append_tag($field_set); foreach ($this->get_hidden_inputs() as $hidden_input) { $content->append_tag($hidden_input); } $submit_buttons_div = new HTMLTags_Div(); $submit_buttons_div->set_attribute_str('class', 'submit_buttons_div'); $submit_buttons_div->append_tag_to_content($this->get_submit_button()); $submit_buttons_div->append_tag_to_content($this->get_cancel_button()); $content->append_tag($submit_buttons_div); # The content return $content; }
public function get_content() { #echo "\$this->offset: $this->offset\n"; #echo "\$this->limit: $this->limit\n"; $content = new HTMLTags_TagContent(); /* * Are we at the beginning? */ if ($this->offset > 0) { $first_offset = 0; $previous_offset = $this->offset - $this->limit; $first_page_li = new HTMLTags_LI(); $link_to_first_page = new HTMLTags_A('first'); # How will we set this to 'primero' etc? $first_page_href = clone $this->link_href; $first_page_href->set_get_variable('offset', 0); $first_page_href->set_get_variable('limit', $this->limit); $link_to_first_page->set_href($first_page_href); $first_page_li->append_tag_to_content($link_to_first_page); $content->append_tag($first_page_li); /* * Do previous and first collide? */ if ($first_offset < $previous_offset) { $previous_page_li = new HTMLTags_LI(); $link_to_previous_page = new HTMLTags_A('previous'); $previous_page_href = clone $this->link_href; $previous_page_href->set_get_variable('offset', $previous_offset); $previous_page_href->set_get_variable('limit', $this->limit); $link_to_previous_page->set_href($previous_page_href); $previous_page_li->append_tag_to_content($link_to_previous_page); $content->append_tag($previous_page_li); } } /* * Current * * offset to offset + limit */ $current_page_li = new HTMLTags_LI(); $current_msg = $this->offset + 1; $current_msg .= ' to '; #$row_count = $this->table->count_all_rows(); $current_msg .= $this->offset + $this->limit < $this->row_count ? $this->offset + $this->limit : $this->row_count; $current_page_li->append_str_to_content($current_msg); $content->append_tag($current_page_li); /* * Are there more rows to show? */ #echo "\$row_count: $row_count\n"; if ($this->offset + $this->limit < $this->row_count) { #echo "There are more pages\n"; $next_offset = $this->offset + $this->limit; $last_offset = $this->row_count - ($this->row_count % $this->limit == 0 ? $this->limit : $this->row_count % $this->limit); /* * Do next and final collide? */ if ($next_offset < $last_offset) { $next_page_li = new HTMLTags_LI(); $link_to_next_page = new HTMLTags_A('next'); $next_page_href = clone $this->link_href; $next_page_href->set_get_variable('offset', $next_offset); $next_page_href->set_get_variable('limit', $this->limit); $link_to_next_page->set_href($next_page_href); $next_page_li->append_tag_to_content($link_to_next_page); $content->append_tag($next_page_li); } $last_page_li = new HTMLTags_LI(); $link_to_last_page = new HTMLTags_A('last'); $last_page_href = clone $this->link_href; $last_page_href->set_get_variable('offset', $last_offset); $last_page_href->set_get_variable('limit', $this->limit); $link_to_last_page->set_href($last_page_href); $last_page_li->append_tag_to_content($link_to_last_page); $content->append_tag($last_page_li); } return $content; }
protected function get_content() { $content = new HTMLTags_TagContent(); /* * The Inputs */ $inputs_list = new HTMLTags_OL(); $input_lis = $this->get_input_lis(); if (count($input_lis) > 0) { foreach ($input_lis as $input_li) { $inputs_list->add_li($input_li); } } else { throw new Exception('No inputs set in HTMLTags_SimpleOLForm!'); } $content->append_tag($inputs_list); /* * The buttons */ $submit_buttons_div = new HTMLTags_Div(); $submit_buttons_div->set_attribute_str('class', 'submit_buttons_div'); $submit_buttons_div->append_tag_to_content($this->get_submit_button()); $content->append_tag($submit_buttons_div); /* * The hidden inputs. */ foreach ($this->get_hidden_inputs() as $hidden_input) { $content->append_tag($hidden_input); } return $content; }
public function get_content() { $content = new HTMLTags_TagContent(); /* * Build the LI for each section. */ foreach ($this->anxf->get_sections() as $section) { if ($this->anxf->has_access_permission_for_section($section, $this->admin_user_level)) { $section_li = new HTMLTags_LI(); /* * Append the section title. */ $section_title = $this->anxf->get_section_title($section); $section_title_h3 = new HTMLTags_Heading(3, $section_title); $section_title_h3->set_attribute_str('id', 'section-title'); $section_li->append_tag_to_content($section_title_h3); /* * We deal with the project-specific section differently * as it doesn't have modules. */ if ($section == 'project-specific') { $pages = $this->anxf->get_pages_in_section($section); $section_ul = new HTMLTags_UL(); $section_ul->set_attribute_str('class', 'section-pages-list'); foreach ($pages as $page) { if ($this->anxf->has_access_permission_for_page_in_section($page, $section, $this->admin_user_level)) { $page_li = new HTMLTags_LI(); $page_title = $this->anxf->get_title_for_page_in_section($page, $section); $page_a = new HTMLTags_A($page_title); $page_url = $this->anxf->get_url_for_page_in_section($page, $section); $page_a->set_href($page_url); $page_li->append_tag_to_content($page_a); $section_ul->add_li($page_li); } } $section_li->append_tag_to_content($section_ul); } else { $modules = $this->anxf->get_modules_in_section($section); $section_ul = new HTMLTags_UL(); foreach ($modules as $module) { if ($this->anxf->has_access_permission_for_module_in_section($module, $section, $this->admin_user_level)) { $module_li = new HTMLTags_LI(); $module_title = $this->anxf->get_module_title_in_section($module, $section); #$module_li->append_str_to_content($module); $module_title_h4 = new HTMLTags_Heading(4, $module_title); $module_title_h4->set_attribute_str('id', 'module-title'); $module_li->append_tag_to_content($module_title_h4); $module_ul = new HTMLTags_UL(); $module_ul->set_attribute_str('class', 'module-pages-list'); $pages = $this->anxf->get_pages_in_module($module, $section); #echo 'count($pages): ' . count(\$pages) . "\n"; foreach ($pages as $page) { if ($this->anxf->has_access_permission_for_page_in_module_in_section($page, $module, $section, $this->admin_user_level)) { $page_li = new HTMLTags_LI(); $page_title = $this->anxf->get_title_for_page_in_module_in_section($page, $module, $section); $page_a = new HTMLTags_A($page_title); $page_url = $this->anxf->get_url_for_page_in_module_in_section($page, $module, $section); $page_a->set_href($page_url); $page_li->append_tag_to_content($page_a); $module_ul->add_li($page_li); } } $module_li->append_tag_to_content($module_ul); $section_ul->add_li($module_li); } } $section_li->append_tag_to_content($section_ul); } $content->append_tag($section_li); } } return $content; }