Skip to content

Commit

Permalink
Merge pull request #13 from datopian/fix/translation
Browse files Browse the repository at this point in the history
translation fix and map improvement
  • Loading branch information
sagargg authored May 20, 2024
2 parents 52c85aa + da4db88 commit 5cf007d
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 5 deletions.
14 changes: 14 additions & 0 deletions ckanext/rvr/assets/css/rvr.css
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,17 @@ div#dataset-map-attribution div a{
background-color: #c8e9e842;
}

.spatial-map-clear {
position: absolute;
z-index: 1;
right: 40px;
top: 4px;
color: #888888;
font-size: 12px;
line-height: 20px;
text-decoration: underline;
}


.dataset-map-expanded #dataset-map {
height: 412px !important;
Expand Down Expand Up @@ -964,6 +975,9 @@ div#dataset-map-container.map-draw-field {
}


#dataset-map {
position: relative;
}

.dataset-map-expanded #dataset-map {
position: absolute;
Expand Down
13 changes: 11 additions & 2 deletions ckanext/rvr/assets/js/rvrSpatialQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ this.ckan.module('rvr-spatial-query', function ($, _) {
'dataset-map-container',
mapConfig,
{
center: [51.53662006757711, 7.1741345200178],
attributionControl: false,
drawControlTooltips: false,
maxBounds: this.options.default_extent,
Expand All @@ -107,15 +108,23 @@ this.ckan.module('rvr-spatial-query', function ($, _) {

// OK add the expander
$('a.leaflet-draw-draw-rectangle', module.el).on('click', function(e) {
e.preventDefault();

if (!is_exanded) {
$('body').addClass('dataset-map-expanded');
if (should_zoom && !extentLayer) {

if (should_zoom && !extentLayer && map) {
map.zoomIn();
}
resetMap();

if (typeof resetMap === "function") {
resetMap();
}

is_exanded = true;
}
});

var buttonsHtml = [
'<div id="dataset-map-edit-buttons">',
'<a href="javascript:;" class="btn cancel">'+ this._('Cancel')+ '</a> ',
Expand Down
2 changes: 1 addition & 1 deletion ckanext/rvr/templates/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h1 class="page-heading">{{ _("Welcome to CKAN") }}</h1>
</div>
</div>
</div>
<a href="/pages/uber-uns">ÜBER UNS</a>
<a href="/pages/uber-uns">Über mich</a>
</div>
<div class="module-content box box2">
<div class="textbox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
</div>

<div class="form-group control-full">
<label class="control-label" for="field-org-bbox">Dataset Coordinates</label>
<label class="control-label" for="field-org-bbox">Koordinaten des Datensatzes</label>

{% if org_default == 'Unmigrated' %}
<div class="alert alert-warning" role="alert">Editing spatial fields for this dataset has been disabled. Please contact the admin to enable spatial inheritance for this dataset.</div>
Expand Down
2 changes: 1 addition & 1 deletion ckanext/rvr/templates/spatial/spatial_query.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

#}
<section id="dataset-map" class="module module-narrow module-shallow">
<a href="{{ h.remove_url_param(['ext_bbox']) }}" class="action spatial-map-clear">{{ _('Clear') }}</a>
<h2 class="module-heading" data-bs-toggle="collapse" data-module="collapse-arrow" data-bs-target="#collapse-dataset-map" aria-expanded="true" aria-controls="collapse-dataset-map">
<span class="fa fa-chevron-up collapse-arrow"></span>
<i class="fa fa-globe"></i>
{{ _('Filter this by location') }}
<a href="{{ h.remove_url_param(['ext_bbox']) }}" class="action">{{ _('Clear') }}</a>
<p class="module-subheading">{{ _('Mit Klick auf den Stift Filterbereich festlegen.') }} </p>
</h2>
{% set map_config = h.get_common_map_config() %}
Expand Down
7 changes: 7 additions & 0 deletions ckanext/rvr/templates/user/dashboard_groups.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% ckan_extends %}

{% block page_primary_action %}
{% if h.check_access('group_create') %}
{% link_for h.humanize_entity_type('group', group_type, 'add link') or _('Add Group'), named_route=group_type ~ '.new', class_="btn btn-primary", icon="plus-square" %}
{% endif %}
{% endblock %}
9 changes: 9 additions & 0 deletions ckanext/rvr/templates/user/dashboard_organizations.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% ckan_extends %}

{% set org = 'organization' %}

{% block page_primary_action %}
{% if h.check_access('organization_create') %}
{% link_for h.humanize_entity_type('organization', org, 'add link') or _('Add Organization'), named_route=org ~ '.new', class_="btn btn-primary", icon="plus-square" %}
{% endif %}
{% endblock %}

0 comments on commit 5cf007d

Please sign in to comment.