예제 #1
0
 public function groupmap($group_id)
 {
     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //Make sure we have a group
     if (!$group_id) {
         url::redirect('main');
     }
     $group = ORM::factory('simplegroups_groups', $group_id)->find($group_id);
     if (!$group->loaded) {
         url::redirect('main');
     }
     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // Setup the map
     adminmap_helper::setup_adminmap($this, "simplegroups/about_map", "simplegroups/css/simplegroupmap");
     //get the categories
     adminmap_helper::set_categories($this, false, $group);
     //setup the map
     $clustering = Kohana::config('settings.allow_clustering');
     $json_url = $clustering == 1 ? "simplegroupmap_json/cluster/{$group_id}" : "simplegroupmap_json/index/{$group_id}";
     $json_timeline_url = "simplegroupmap_json/timeline/{$group_id}/";
     adminmap_helper::set_map($this->template, $this->themes, $json_url, $json_timeline_url, 'simplegroups/mapview_js', 'simplegroups/frontend_map/main_map', 'simplegroups/frontend_map/main_timeline');
     //setup the overlays and shares
     adminmap_helper::set_overlays_shares($this);
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //stuff to setup the group
     $this->template->content->group_name = $group->name;
     $this->template->content->group_description = $group->description;
     $this->template->content->group_id = $group->id;
     $this->template->content->group_logo = $group->logo;
     $this->template->header->header_block = $this->themes->header_block();
 }
예제 #2
0
 public function index()
 {
     adminmap_helper::setup_adminmap($this);
     //get the categories
     adminmap_helper::set_categories($this, true, $this->group);
     //setup the map
     $clustering = Kohana::config('settings.allow_clustering');
     $json_url = $clustering == 1 ? "admin/simplegroups/adminmap_json/cluster" : "admin/simplegroups/adminmap_json";
     $json_timeline_url = "admin/simplegroups/adminmap_json/timeline/";
     adminmap_helper::set_map($this->template, $this->template, $json_url, $json_timeline_url, 'simplegroups/mapview_js');
     //setup the overlays and shares
     adminmap_helper::set_overlays_shares($this);
 }
예제 #3
0
	public function index()
	{
		
		adminmap_helper::setup_adminmap($this);
		
		//get the categories
		adminmap_helper::set_categories($this, true);
		
		//setup the map
		$clustering = Kohana::config('settings.allow_clustering');
		$json_url = ($clustering == 1) ? "json/cluster" : "json";
		$json_timeline_url = "json/timeline/";
		adminmap_helper::set_map($this->template, $this->template, $json_url, $json_timeline_url);
		
		//setup the overlays and shares
		adminmap_helper::set_overlays_shares($this);
		
	}//end index method
예제 #4
0
 public function index()
 {
     ////////////////////////////////////////////////////////////////////////////////////////////////
     // custom JS that the print map needs
     plugin::add_javascript("adminmap/js/jquery.address-1.4.min.js");
     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // Setup the map
     adminmap_helper::setup_adminmap($this, "adminmap/print_mapview", "adminmap/css/print_adminmap");
     //ARE WE CLUSTERING?
     $clustering = Kohana::config('settings.allow_clustering');
     /////////////////////////////////////////////////////////////////////////////////////////////////////////
     //get the CATEGORIES
     /////////////////////////////////////////////////////////////////////////////////////////////////////////
     if (isset($this->group_id) && $this->group_id) {
         $group_id = $this->group_id;
         $group = ORM::factory('simplegroups_groups', $this->group_id)->find($this->group_id);
         //get the categories
         adminmap_helper::set_categories($this, false, $group);
         $json_url = $clustering == 1 ? "simplegroupmap_json/cluster/{$group_id}" : "simplegroupmap_json/index/{$group_id}";
         $json_timeline_url = "simplegroupmap_json/timeline/{$group_id}/";
     } else {
         //get the categories
         adminmap_helper::set_categories($this, false);
         $json_url = $clustering == 1 ? "bigmap_json/cluster" : "bigmap_json";
         $json_timeline_url = "bigmap_json/timeline/";
     }
     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //setup the map
     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     adminmap_helper::set_map($this->template, $this->themes, $json_url, $json_timeline_url, 'adminmap/print_mapview_js', 'adminmap/big_main_map', 'adminmap/print_main_timeline');
     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //setup the overlays and shares
     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     adminmap_helper::set_overlays_shares($this);
     plugin::add_stylesheet("adminmap/css/jquery.hovertip-1.0");
     plugin::add_javascript("adminmap/js/jquery.hovertip-1.0");
     $this->template->header = new View('adminmap/print_map_header');
     $this->template->header->site_name = $this->site_name;
     $this->template->header->this_page = "";
     // Rebuild Header Block
     $this->template->header->header_block = $this->themes->header_block();
 }