Skip to content
Snippets Groups Projects
Commit d1840222 authored by anonymous's avatar anonymous
Browse files

ODPSH-31: change layout

parent fe9b057f
No related branches found
No related tags found
No related merge requests found
Showing
with 137 additions and 21 deletions
{'fq': u'owner_org:"824ae07b-7a18-4a4d-a3e6-5b8660d635b8"', 'facet.mincount': 0, 'rows': 0, 'facet': u'false', 'extras': {}, 'include_private': True}
#: ckanext/datarequests/templates/datarequests/new.html:3
#: ckanext/datarequests/templates/datarequests/new.html:7
#: ckanext/datarequests/templates/datarequests/new.html:11
#: ckanext/datarequests/templates/datarequests/snippets/datarequest_form.html:47
#: ckanext/datarequests/templates/datarequests/snippets/new_datarequest_form.html:7
msgid "Create Data Request"
msgstr "Datenanfrage "
No preview for this file type
...@@ -414,3 +414,9 @@ msgstr "Datensatz vorschlagen" ...@@ -414,3 +414,9 @@ msgstr "Datensatz vorschlagen"
msgid "Add New Comment" msgid "Add New Comment"
msgstr "Kommentieren" msgstr "Kommentieren"
msgid "Create New Data Request"
msgstr "Neuen Datensatz vorschlagen"
msgid "Suggest New Data Request"
msgstr "Datensatz vorschlagen"
\ No newline at end of file
...@@ -1951,3 +1951,32 @@ p.package-info-categorie ...@@ -1951,3 +1951,32 @@ p.package-info-categorie
justify-content: center; justify-content: center;
padding-top: 20px; padding-top: 20px;
} }
.label.label-open
{
color: white;
background-color: #003064;
}
.label.label-open
{
color: white;
background-color: #003064;
}
.datarequest-subtitle
{
font-size: 12px;
line-height: 12px;
height: 12px;
}
.datarequest-item-open-time
{
padding-right: 4px;
border-right: 1px solid;
}
.datarequest-item-autor-name
{
padding-left: 4px;
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<section class="module"> <section class="module">
<div class="module-content"> <div class="module-content">
{% block page_primary_action %} {% block page_primary_action %}
{% snippet 'snippets/custom_search_form.html', query=c.q, fields=(('organization', c.organization), ('state', c.state)), sorting=c.filters, sorting_selected=c.sort, placeholder=_('Search Data Requests...'), no_bottom_border=true, count=c.datarequest_count, no_title=True %} {% snippet 'snippets/custom_search_form.html', query=c.q, fields=(('organization', c.organization), ('state', c.state)), sorting=c.filters, sorting_selected=c.sort, placeholder=_('Search Data Requests...'), no_bottom_border=false, count=c.datarequest_count, no_title=True %}
{{ h.snippet('datarequests/snippets/datarequest_list.html', datarequest_count=c.datarequest_count, datarequests=c.datarequests, page=c.page, q=c.q)}} {{ h.snippet('datarequests/snippets/datarequest_list.html', datarequest_count=c.datarequest_count, datarequests=c.datarequests, page=c.page, q=c.q)}}
{% if h.check_access('create_datarequest') %} {% if h.check_access('create_datarequest') %}
<div class="add_request_container"> <div class="add_request_container">
......
{% extends "datarequests/base.html" %}
{% block subtitle %}{{ _('Create Data Request') }}{% endblock %}
{% block breadcrumb_content %}
<li>{% link_for _('Data Requests'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='index' %}</li>
<li class="active"><a href="">{{ _('Create Data Request') }}</a></li>
{% endblock %}
{% block primary_content_inner %}
<h1 class="{% block page_heading_class %}page-heading{% endblock %}">{% block page_heading %}{{ _('Create New Data Request') }}{% endblock %}</h1>
{% snippet "datarequests/snippets/new_datarequest_form.html", data=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, offering=c.offering %}
{% endblock %}
{% block secondary_content_additional_info %}
<p>{% trans %}To create a data request, fill the form and specify a title and a description for your request. Please, be as clear as you can in order to ease the task of accomplishing your request. You can also specify an organization if your data request is closely related with it. {% endtrans %}
</p>
{% endblock %}
{% block page_header %}{% endblock %}
\ No newline at end of file
{% import 'macros/form.html' as form %}
{% set title = data.get('title', '') %}
{% set description = data.get('description', '') %}
{% set organization_id = data.get('organization_id', h.get_request_param('organization')) %}
{% set organizations_available = h.organizations_available('read') %}
{% set form_horizontal = 'form-horizontal' if h.ckan_version()[:3] <= '2.7' else '' %}
{# This provides a full page that renders a form for publishing a dataset. It can
then itself be extended to add/remove blocks of functionality. #}
<form class="dataset-form {{ form_horizontal }}" method="post" data-module="basic-form" action enctype="multipart/form-data">
<input type="hidden" id="id" name="id" value="{{ data.get('id', '') }}" />
{% block errors %}{{ form.errors(errors_summary) }}{% endblock %}
{% block offering_title %}
{{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. Data Request Name'), value=title, error=errors['Title'], classes=['control-full', 'control-large'], is_required=true) }}
{% endblock %}
{% block offering_description %}
{{ form.markdown('description', id='field-description', label=_('Description'), placeholder=_('eg. Data Request description'), value=description, error=errors['Description']) }}
{% endblock %}
{% block form_actions %}
<div class="form-actions">
{% block delete_button %}
{% if h.check_access('delete_datarequest', {'id': data.get('id', '')}) and not data.state == 'deleted' %}
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this data request?')}) %}
<a class="btn btn-danger pull-left" href="{% url_for controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='delete', id=data.get('id') %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endblock %}
<button class="btn btn-primary" type="submit" name="save">{% block save_button_text %}{{ _('Create Data Request') }}{% endblock %}</button>
</div>
{% endblock %}
</form>
\ No newline at end of file
...@@ -3,31 +3,40 @@ ...@@ -3,31 +3,40 @@
{% set title = datarequest.get('title', '') %} {% set title = datarequest.get('title', '') %}
{% set description = h.markdown_extract(datarequest.get('description', ''), extract_length=truncate) %} {% set description = h.markdown_extract(datarequest.get('description', ''), extract_length=truncate) %}
<li class="{{ item_class or "dataset-item" }}"> <div class="container-fluid odsh-dataset-item">
{{h.odsh_render_datetime(datarequest.open_time)}}|{{datarequest.user.display_name}}
{% block package_item_content %} {% block package_item_content %}
<div class="dataset-content"> <div class="dataset-content">
<h3 class="dataset-heading"> <div class="dataset-heading ">
<div class="span1">
{% if datarequest.get('closed', False) %} {% if datarequest.get('closed', False) %}
<span class="uppercase label label-closed"> <div class="datarequest-label label-closed">
<i class="icon-lock fa fa-lock"></i> {% trans %}Closed{% endtrans %} {% trans %}Closed{% endtrans %}
</span> </div>
{% else %} {% else %}
<span class="uppercase label label-open"> <div class="label label-open">
<i class="icon-unlock fa fa-unlock"></i> {% trans %}Open{% endtrans %} {% trans %}Open{% endtrans %}
</span> </div>
{% endif %} {% endif %}
</div>
<div class='span9'>
<div class='datarequest-subtitle'>
<span class="datarequest-item-open-time">{{h.odsh_render_datetime(datarequest.open_time)}}</span>
<span class="datarequest-item-autor-name">{{datarequest.user['display_name']}}</span>
</div>
{{ h.link_to(h.truncate(title, truncate_title), h.url_for(controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='show', id=datarequest.get('id', ''))) }} {{ h.link_to(h.truncate(title, truncate_title), h.url_for(controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='show', id=datarequest.get('id', ''))) }}
</h3> </div>
</div>
{% if description %} {% if description %}
<div>{{ description }}</div> <div>{{ description }}</div>
{% endif %} {% endif %}
<div class="datarequest-properties">
{% if h.show_comments_tab() %} {% if h.show_comments_tab() %}
<i class="icon-comment fa fa-comment"></i> {{ h.get_comments_number(datarequest.get('id', '')) }}</span> <i class="icon-comment fa fa-comment"></i> {{ h.get_comments_number(datarequest.get('id', '')) }}</span>
{% link_for _('Add New Comment'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='comment', id=datarequest.get('id',''), class_='btn btn-primary btn-arrow-right' %}
{% endif %} {% endif %}
</div> </div>
<div class="dataset-meta">
{% if h.show_comments_tab() %}
{% link_for _('Add New Comment'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='comment', id=datarequest.get('id',''), class_='btn btn-primary btn-arrow-right' %}
{% endif %}
</div> </div>
{% endblock %} {% endblock %}
</li> </div>
\ No newline at end of file \ No newline at end of file
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
{% block datarequest_search_results_list %} {% block datarequest_search_results_list %}
{% if datarequests %} {% if datarequests %}
<ul class="dataset-list unstyled list-unstyled"> <div class="dataset-list unstyled">
{% for datarequest in datarequests %} {% for datarequest in datarequests %}
{{ h.snippet('datarequests/snippets/datarequest_item.html', datarequest=datarequest, facet_titles=facet_titles) }} {{ h.snippet('datarequests/snippets/datarequest_item.html', datarequest=datarequest, facet_titles=facet_titles) }}
{% endfor %} {% endfor %}
</ul> </div>
{% else %} {% else %}
<p class="empty"> <p class="empty">
{{ _('No Data Requests found with the given criteria') }}. {{ _('No Data Requests found with the given criteria') }}.
......
{% extends "datarequests/snippets/datarequest_form.html" %}
{% block delete_button %}
{% endblock %}
{% block save_button_text %}
{{ _('Suggest New Data Request') }}
{% endblock %}
\ No newline at end of file
...@@ -147,7 +147,7 @@ class TestEnv: ...@@ -147,7 +147,7 @@ class TestEnv:
for p in ['odsh_icap', 'odsh_dcat_harvest', 'odsh_harvest']: for p in ['odsh_icap', 'odsh_dcat_harvest', 'odsh_harvest']:
assert p in value, 'missing plugin:' + p assert p in value, 'missing plugin:' + p
if isSlave(): if isSlave():
for p in ['odsh_autocomplete']: for p in ['odsh_autocomplete datarequests']:
assert p in value, 'missing plugin:' + p assert p in value, 'missing plugin:' + p
# pdb.set_trace() # pdb.set_trace()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment