Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bcf6156
Made themable the form used for contribution.
Daniel-KM Jun 2, 2014
f771138
Fixed the contribution when the form is invalid.
Daniel-KM Sep 18, 2014
88cedaf
Added a route to get all items around one.
Daniel-KM Sep 18, 2014
d9413b8
Added an option to self-determine the confirmation of a change of a l…
Daniel-KM Sep 19, 2014
ab9f001
Removed useless hook for contribution (managed via save).
Daniel-KM Sep 24, 2014
7a72541
Added internationalization of the term Geolocation
JBPressac Feb 19, 2015
b98003d
Fixed default values for map type and address.
Daniel-KM May 24, 2015
7a5be7e
Add accessible markup option to configuration form.
Sep 14, 2015
d04d88b
Added tabular display of map data.
Sep 15, 2015
a60f9b2
Added accessible markup to the map template.
Sep 15, 2015
656884c
Added caption to map on item display.
Sep 16, 2015
95d8125
Merge remote-tracking branch 'doana/accessibility'
Daniel-KM Nov 1, 2015
607ec66
Fixed tabular view.
Daniel-KM Nov 8, 2015
c621bf2
Cleaned whitespaces.
Daniel-KM Nov 8, 2015
0e67ad5
Cleaned config form.
Daniel-KM Nov 8, 2015
8dc043f
Added support to add multiple locations by item.
Daniel-KM Nov 8, 2015
d634733
Added support to browse multiple locations by item.
Daniel-KM Nov 8, 2015
ae3a365
Finalized support of multiple locations by item.
Daniel-KM Nov 8, 2015
83282d3
Added an option to display the search form with the browse view.
Daniel-KM Nov 8, 2015
6ee224a
Added a description field for multiple locations.
Daniel-KM Nov 8, 2015
4d9aebd
Fixed javascript of geolocation to avoid propagation.
Daniel-KM Nov 22, 2015
cea6412
Merge remote-tracking branch 'upstream/master' into tempo
Daniel-KM Nov 22, 2015
30fee85
Made compatible with old format.
Daniel-KM Nov 29, 2015
392cadc
Removed obsolete attributes cellspacing and cellpadding.
Daniel-KM Dec 13, 2015
3a87455
Remove "sensor" parameter from gmaps JS
zerocrates Dec 10, 2015
f8525f1
Removed default for text values.
Daniel-KM Jun 26, 2016
905812a
Pull from Transifex
zerocrates May 4, 2016
04756ac
Allow API key entry
zerocrates May 4, 2016
0c25046
Bump INI versions
zerocrates May 4, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
693 changes: 406 additions & 287 deletions GeolocationPlugin.php

Large diffs are not rendered by default.

155 changes: 0 additions & 155 deletions config_form.php

This file was deleted.

45 changes: 35 additions & 10 deletions controllers/MapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,58 @@ public function init()
{
$this->_helper->db->setDefaultModelName('Item');
}

public function browseAction()
{
$table = $this->_helper->db->getTable();
$locationTable = $this->_helper->db->getTable('Location');

$params = $this->getAllParams();
$params['only_map_items'] = true;
$limit = (int) get_option('geolocation_per_page');
$currentPage = $this->getParam('page', 1);

// Only get pagination data for the "normal" page, only get
// item/location data for the KML output.
// Only get item/location data for the KML output.
if ($this->_helper->contextSwitch->getCurrentContext() == 'kml') {
$items = $table->findBy($params, $limit, $currentPage);
$this->view->items = $items;
$this->view->locations = $locationTable->findLocationByItem($items);
} else {
$this->view->locations = $locationTable->findLocationsByItem($items);
}
// Only get pagination data for the "normal" page.
else {
$item_id = $this->getParam('item_id');
if (!empty($item_id)) {
$this->view->item = get_record_by_id('Item', $item_id);
$this->view->location = $locationTable->findLocationsByItem($item_id, true);
}
$this->view->totalItems = $table->count($params);
$this->view->params = $params;

$pagination = array(
'page' => $currentPage,
'per_page' => $limit,
'total_results' => $this->view->totalItems
'page' => $currentPage,
'per_page' => $limit,
'total_results' => $this->view->totalItems,
);
Zend_Registry::set('pagination', $pagination);
}
}

public function tabularAction()
{
// Get pagination data via the browse action.
$this->browseAction();

// Get the list of items like in browse action / kml context.
$table = $this->_helper->db->getTable();
$locationTable = $this->_helper->db->getTable('Location');

$params = $this->getAllParams();
$params['only_map_items'] = true;
$limit = (int) get_option('geolocation_per_page');
$currentPage = $this->getParam('page', 1);

$items = $table->findBy($params, $limit, $currentPage);
$this->view->items = $items;
$this->view->locations = $locationTable->findLocationsByItem($items);
}
}
Binary file added languages/bg_BG.mo
Binary file not shown.
Loading