Skip to content
Snippets Groups Projects
Commit 6f035193 authored by Thorge Petersen's avatar Thorge Petersen
Browse files

More webassets

parent 516eb438
No related branches found
No related tags found
2 merge requests!41Version 2.0.0,!38Merge py3 into dev
odsh_base_script: # name of the asset odsh_base_script:
filters: rjsmin # preprocessor for files. Optional filters: rjsmin # preprocessor
output: ckanext-odsh/odsh_base.js # actual path, where the generated file will be stored output: ckanext-odsh/odsh_base.js
contents: # list of files that are included in the asset contents:
- autocomplete.js - autocomplete.js
- odsh.js - odsh.js
odsh_base_style: # name of asset odsh_base_style:
output: ckanext-odsh/odsh_base.css # actual path, where generated file will be stored output: ckanext-odsh/odsh_base.css
contents: # list of files that are included into asset contents:
- odsh.css - odsh.css
- odsh_header.css - odsh_header.css
- bootstrap-multiselect.css - bootstrap-multiselect.css
tpsh_toggle_menu: # name of the asset odsh_datepicker_script:
filters: rjsmin # preprocessor for files. Optional filters: rjsmin # preprocessor
output: ckanext-odsh/tpsh_toggle_menu.js # actual path, where the generated file will be stored output: ckanext-odsh/odsh_datepicker.js
contents: # list of files that are included in the asset contents:
- moment.js
- bootstrap-datepicker.js
- odsh_datepicker.js
odsh_datepicker_style:
output: ckanext-odsh/odsh_datepicker.css
contents:
- datepicker.css
odsh_form_script:
filters: rjsmin # preprocessor
output: ckanext-odsh/odsh_form.js
contents:
- odsh_form.js
- odsh_populate_tags.js
- bootstrap-multiselect.js
odsh_resource_form_script:
filters: rjsmin # preprocessor
output: ckanext-odsh/odsh_resource_form.js
contents:
- odsh_image-upload.js
- odsh_form.js
- odsh_guessformat.js
odsh_popover_script:
filters: rjsmin # preprocessor
output: ckanext-odsh/odsh_popover.js
contents:
- odsh_popover.js
tpsh_toggle_menu:
filters: rjsmin # preprocessor
output: ckanext-odsh/tpsh_toggle_menu.js
contents:
- tpsh_toggle_menu.js - tpsh_toggle_menu.js
# odsh_dataset_map_script: # name of the asset tpsh_validate_password:
# filters: rjsmin # preprocessor for files. Optional filters: rjsmin # preprocessor
# output: ckanext-odsh/odsh_dataset_map.js # actual path, where the generated file will be stored output: ckanext-odsh/tpsh_validate_password.js
# contents: # list of files that are included in the asset contents:
# - vendor/leaflet.js - tpsh_validate_password.js
# - vendor/proj4-compressed.js
# - vendor/proj4leaflet.js
# - common_map.js
# - odsh_dataset_map.js
# odsh_dataset_map_style: # name of asset odsh_dataset_map_script:
# output: ckanext-odsh/odsh_dataset_map.css # actual path, where generated file will be stored filters: rjsmin # preprocessor
# contents: # list of files that are included into asset output: ckanext-odsh/odsh_dataset_map.js
# - leaflet.css contents:
# - dataset_map.css - vendor/leaflet.js
- vendor/proj4-compressed.js
- vendor/proj4leaflet.js
- common_map.js
- odsh_dataset_map.js
# odsh_spatial_query_script: # name of the asset odsh_dataset_map_style:
# filters: rjsmin # preprocessor for files. Optional output: ckanext-odsh/odsh_dataset_map.css
# output: ckanext-odsh/odsh_spatial_query.js # actual path, where the generated file will be stored contents:
# contents: # list of files that are included in the asset - leaflet.css
# - vendor/leaflet.js - dataset_map.css
# - vendor/proj4-compressed.js
# - vendor/proj4leaflet.js
# - vendor/vendor/leaflet.draw.js
# - common_map.js
# - odsh_spatial_query.js
# odsh_spatial_query_style: # name of asset odsh_spatial_query_script:
# output: ckanext-odsh/odsh_spatial_query.css # actual path, where generated file will be stored filters: rjsmin # preprocessor
# contents: # list of files that are included into asset output: ckanext-odsh/odsh_spatial_query.js
# - leaflet.css contents:
# - leaflet.draw.css - vendor/leaflet.js
# - spatial_query.css - vendor/proj4-compressed.js
- vendor/proj4leaflet.js
- vendor/vendor/leaflet.draw.js
- common_map.js
- odsh_spatial_query.js
odsh_spatial_query_style:
output: ckanext-odsh/odsh_spatial_query.css
contents:
- leaflet.css
- leaflet.draw.css
- spatial_query.css
# autocomplete_script: # name of the asset # autocomplete_script:
# filters: rjsmin # preprocessor for files. Optional # filters: rjsmin # preprocessor
# output: ckanext-odsh/autocomplete.js # actual path, where the generated file will be stored # output: ckanext-odsh/autocomplete.js
# contents: # list of files that are included in the asset # contents:
# - vendor/jquery-ui-autocomplete/jquery-ui.js # - vendor/jquery-ui-autocomplete/jquery-ui.js
# - autocomplete.js # - autocomplete.js
# autocomplete_style: # name of asset # autocomplete_style:
# output: ckanext-odsh/autocomplete.css # actual path, where generated file will be stored # output: ckanext-odsh/autocomplete.css
# contents: # list of files that are included into asset # contents:
# - vendor/jquery-ui-autocomplete/jquery-ui.css # - vendor/jquery-ui-autocomplete/jquery-ui.css
# - vendor/jquery-ui-autocomplete/jquery-ui.structure.css # - vendor/jquery-ui-autocomplete/jquery-ui.structure.css
# - vendor/jquery-ui-autocomplete/jquery-ui.theme.css # - vendor/jquery-ui-autocomplete/jquery-ui.theme.css
# - autocomplete.css # - autocomplete.css
# odsh_all_script: # name of the asset # odsh_all_script:
# filters: rjsmin # preprocessor for files. Optional # filters: rjsmin # preprocessor
# output: ckanext-odsh/odsh_all.js # actual path, where the generated file will be stored # output: ckanext-odsh/odsh_all.js
# contents: # list of files that are included in the asset # contents:
# - autocomplete.js # - autocomplete.js
# - bootstrap-datepicker.js # - bootstrap-datepicker.js
# - bootstrap-multiselect.js # - bootstrap-multiselect.js
...@@ -94,9 +135,9 @@ tpsh_toggle_menu: # name of the asset ...@@ -94,9 +135,9 @@ tpsh_toggle_menu: # name of the asset
# - vendor/proj4-compressed.js # - vendor/proj4-compressed.js
# - vendor/proj4leaflet.js # - vendor/proj4leaflet.js
# odsh_all_style: # name of asset # odsh_all_style:
# output: ckanext-odsh/odsh_all.css # actual path, where generated file will be stored # output: ckanext-odsh/odsh_all.css
# contents: # list of files that are included into asset # contents:
# - autocomplete.css # - autocomplete.css
# - dataset_map.css # - dataset_map.css
# - datepicker.css # - datepicker.css
......
{% ckan_extends %} {% ckan_extends %}
{% block styles %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_datepicker_style' %}
{% endblock styles %}
{% block breadcrumb_content %} {% block breadcrumb_content %}
<li class="active">{{ h.nav_link(_('Datasets'), controller='dataset', action='search', highlight_actions = 'new index') }}</li> <li class="active">{{ h.nav_link(_('Datasets'), controller='dataset', action='search', highlight_actions = 'new index') }}</li>
...@@ -112,3 +116,8 @@ method="get" data-module="select-switch"> ...@@ -112,3 +116,8 @@ method="get" data-module="select-switch">
{% block pre_wrap %} {% block pre_wrap %}
</form> </form>
{% endblock %} {% endblock %}
{% block scripts %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_datepicker_script' %}
{% endblock scripts %}
{% import 'macros/form.html' as form %} {% import 'macros/form.html' as form %}
{% block styles %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_datepicker_style' %}
{% endblock styles %}
{% set dataset_is_draft = data.get('state', 'draft').startswith('draft') or data.get('state', 'none') == 'none' %} {% set dataset_is_draft = data.get('state', 'draft').startswith('draft') or data.get('state', 'none') == 'none' %}
...@@ -315,6 +319,11 @@ dataset_is_draft)) %} ...@@ -315,6 +319,11 @@ dataset_is_draft)) %}
</div> </div>
</div> </div>
{% block scripts %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_datepicker_script' %}
{% asset 'ckanext-odsh/odsh_form_script' %}
{% endblock scripts %}
{# field reference #} {# field reference #}
{% set field = 'reference' %} {% set field = 'reference' %}
......
...@@ -116,3 +116,8 @@ ...@@ -116,3 +116,8 @@
</div> </div>
<span class='required-text'>*Pflichtangabe</span> <span class='required-text'>*Pflichtangabe</span>
</form> </form>
{% block scripts %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_resource_form_script' %}
{% endblock scripts %}
\ No newline at end of file
...@@ -39,3 +39,8 @@ reason - A reason why the dataset doesn't have a rating. ...@@ -39,3 +39,8 @@ reason - A reason why the dataset doesn't have a rating.
</a> </a>
</div> </div>
</span> </span>
{% block scripts %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_popover_script' %}
{% endblock scripts %}
\ No newline at end of file
{% block styles %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_dataset_map_style' %}
{% endblock styles %}
{% set map_config = h.get_common_map_config() %} {% set map_config = h.get_common_map_config() %}
{% set x=map_config.__setitem__("height", "10px") %} {% set x=map_config.__setitem__("height", "10px") %}
<div class="dataset-map" data-module="dataset-map" data-extent="{{ extent }}" data-module-site_url="{{ h.dump_json(h.url('/', locale='default', qualified=true)) }}" data-module-map_config="{{ h.dump_json(map_config) }}"> <div class="dataset-map" data-module="dataset-map" data-extent="{{ extent }}" data-module-site_url="{{ h.dump_json(h.url('/', locale='default', qualified=true)) }}" data-module-map_config="{{ h.dump_json(map_config) }}">
...@@ -6,3 +11,8 @@ ...@@ -6,3 +11,8 @@
{% snippet "spatial/snippets/map_attribution.html", map_config=map_config %} {% snippet "spatial/snippets/map_attribution.html", map_config=map_config %}
</div> </div>
</div> </div>
{% block scripts %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_dataset_map_script' %}
{% endblock scripts %}
\ No newline at end of file
{% block styles %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_spatial_query_style' %}
{% endblock styles %}
<section id="dataset-map" class="module-narrow module-shallow" data-module="odsh-map"> <section id="dataset-map" class="module-narrow module-shallow" data-module="odsh-map">
<h2 class="module-heading"> <h2 class="module-heading">
{{_('map')}}: {{_('map')}}:
...@@ -14,3 +19,7 @@ ...@@ -14,3 +19,7 @@
</div> </div>
</section> </section>
{% block scripts %}
{{ super() }}
{% asset 'ckanext-odsh/odsh_spatial_query_script' %}
{% endblock scripts %}
\ No newline at end of file
{% import 'macros/form.html' as form %} {% import 'macros/form.html' as form %}
<form id="user-edit-form" class="dataset-form form-horizontal" method="post" action="{{ action }}"> <form id="user-edit-form" class="dataset-form form-horizontal" method="post" action="{{ action }}">
{{ form.errors(error_summary) }} {{ form.errors(error_summary) }}
...@@ -56,3 +55,8 @@ ...@@ -56,3 +55,8 @@
<button class="btn btn-primary" type="submit" name="save">{{ _('Update Profile') }}</button> <button class="btn btn-primary" type="submit" name="save">{{ _('Update Profile') }}</button>
</div> </div>
</form> </form>
{% block scripts %}
{{ super() }}
{% asset 'ckanext-odsh/tpsh_validate_password' %}
{% endblock scripts %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment