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

merge

parents c2899694 135334ff
No related branches found
No related tags found
No related merge requests found
Showing
with 152 additions and 51 deletions
...@@ -431,3 +431,23 @@ msgstr "Veröffentlicht" ...@@ -431,3 +431,23 @@ msgstr "Veröffentlicht"
msgid "Suggester" msgid "Suggester"
msgstr "Vorschlagende" msgstr "Vorschlagende"
msgid "Done"
msgstr "Fertig"
msgid "Data Proposal"
msgstr "Datenvorschlag"
msgid "No data proposal found"
msgstr "Kein Datenvorschlag gefunden"
msgid "{number} data proposal found"
msgid_plural "{number} data proposals found"
msgstr[0] "{number} Ergebnis"
msgstr[1] "{number} Ergebnisse"
msgid "Date Descending"
msgstr "Datum absteigend"
msgid "Date Ascending"
msgstr "Datum aufsteigend"
...@@ -1965,6 +1965,12 @@ p.package-info-categorie ...@@ -1965,6 +1965,12 @@ p.package-info-categorie
background-color: #003064; background-color: #003064;
} }
.label.label-closed
{
color: white;
background-color: #DBDBDB;
}
.datarequest-subtitle .datarequest-subtitle
{ {
font-size: 12px; font-size: 12px;
...@@ -1996,7 +2002,8 @@ p.package-info-categorie ...@@ -1996,7 +2002,8 @@ p.package-info-categorie
.odsh-comment-wrapper{ .odsh-comment-wrapper{
padding-left: 0px; padding-left: 0px;
max-width: 400px; max-width: 470px;
margin-bottom: 25px;
} }
.odsh-comment-wrapper .controls{ .odsh-comment-wrapper .controls{
...@@ -2036,4 +2043,35 @@ p.package-info-categorie ...@@ -2036,4 +2043,35 @@ p.package-info-categorie
.datarequest .additional-info{ .datarequest .additional-info{
font-weight: normal; font-weight: normal;
font-size: 13px; font-size: 13px;
display: table-cell;
width: 220px;
padding-left: 25px;
}
.datarequest-primary {
display: table-cell;
width: 715px;
}
.datarequest .primary.span9 {
width: 960px;
padding-left: 0px;
}
.datarequest .additional-info .dataset-details{
display: inline-block;
}
.datarequest .additional-info .label{
margin: 8px;
}
.datarequest .dataset-meta
{
padding-left: 25px;
}
.datarequest .dataset-heading
{
max-width: 100%;
}
.datarequest .dataset-content .icon-comment
{
margin-top: 10px;
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{% endblock %} {% endblock %}
{% block breadcrumb_content %} {% block breadcrumb_content %}
<li class="active">{% link_for _('Data Requests'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='index' %}</li> <li class="active">{% link_for _('Data Proposal'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='index' %}</li>
{% endblock %} {% endblock %}
{% block main_content %} {% block main_content %}
......
...@@ -22,6 +22,15 @@ ...@@ -22,6 +22,15 @@
{% link_for _('Close'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='close', id=datarequest_id, class_='btn btn-danger', icon='lock' %} {% link_for _('Close'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='close', id=datarequest_id, class_='btn btn-danger', icon='lock' %}
{% endif %} {% endif %}
<h2 class="page-heading">
{% block page_heading %}
{{c.datarequest.title}}
{% endblock %}
</h2>
<div class='datarequest-primary'>
{{ h.render_markdown(h.get_translated(c.datarequest, 'description')) }}
{% snippet "datarequests/snippets/comments.html", comments=c.comments, datarequest=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, updated_comment=c.updated_comment %} {% snippet "datarequests/snippets/comments.html", comments=c.comments, datarequest=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, updated_comment=c.updated_comment %}
{% if h.check_access('comment_datarequest', {'id':c.datarequest.id }) %} {% if h.check_access('comment_datarequest', {'id':c.datarequest.id }) %}
...@@ -37,5 +46,40 @@ ...@@ -37,5 +46,40 @@
{% snippet "datarequests/snippets/comment_form.html", datarequest=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, offering=c.offering, initial_text=c.updated_comment.comment if create_comment_error, focus=create_comment_error, current_user=c.userobj %} {% snippet "datarequests/snippets/comment_form.html", datarequest=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, offering=c.offering, initial_text=c.updated_comment.comment if create_comment_error, focus=create_comment_error, current_user=c.userobj %}
</div> </div>
{% endif %} {% endif %}
</div>
<section class="additional-info">
{% block package_additional_info %}
<div>{{ _('Released') }}: {{ h.odsh_render_datetime(c.datarequest.open_time) }}</div>
<div>{{ _('Suggester') }}: {{ c.datarequest.user['display_name'] if c.datarequest.user else _('None') }}</div>
{#<td class="dataset-details" title="{{ c.datarequest.close_time }}">{{ h.time_ago_from_timestamp(c.datarequest.close_time) if c.datarequest.close_time else _('Not closed yet') }}</td>#}
<div >{{ _('Status') }}:
<div class="dataset-details">
{% if c.datarequest.get('closed', False) %}
<div class="label label-closed">
{% trans %}Closed{% endtrans %}
</div>
{% else %}
<div class="label label-open">
{% trans %}Open{% endtrans %}
</div>
{% endif %}
</div>
{#{% if c.datarequest.closed %}
<tr>
<th scope="row" class="dataset-label">{{ _('Accepted Dataset') }}</th>
<td class="dataset-details">
{% if c.datarequest.accepted_dataset %}
{% link_for c.datarequest.accepted_dataset['title'], controller='package', action='read', id=c.datarequest.accepted_dataset.get('id') %}
{% else %}
{{ _('None') }}
{% endif %}
</td>
</tr>
{% endif %}
#}
<div class='comment-count-wrapper'><i class="icon-comment fa fa-comment"></i> {{ h.get_comments_number(c.datarequest.get('id', '')) }}</span> </div>
{% endblock %}
</section>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<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=false, count=c.datarequest_count, no_title=True %} <form id='datarequest-search-form' method="get" data-module="select-switch">
{% snippet 'snippets/custom_search_form.html', form_id='datarequest-search-form', 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, type='datarequest' %}
{{ 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">
...@@ -16,9 +17,16 @@ ...@@ -16,9 +17,16 @@
</section> </section>
{% endblock %} {% endblock %}
{% block secondary_content %} {% block secondary%}
{% endblock %}
{#{% block secondary_content %}
{{ super() }} {{ super() }}
{% for facet in c.facet_titles %} {% for facet in c.facet_titles %}
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }}
{% endfor %} {% endfor %}
{% endblock %}#}
{% block pre_wrap %}
</form>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -25,40 +25,7 @@ ...@@ -25,40 +25,7 @@
{{ h.build_nav_icon('show_datarequest', _('Data Request'), id=datarequest_id) }} {{ h.build_nav_icon('show_datarequest', _('Data Request'), id=datarequest_id) }}
{% endblock %} {% endblock %}
{% block secondary_content %} {% block secondary %}
<section class="additional-info">
{% block package_additional_info %}
<div>{{ _('Released') }}: {{ h.odsh_render_datetime(c.datarequest.open_time) }}</div>
<div>{{ _('Suggester') }}: {{ c.datarequest.user['display_name'] if c.datarequest.user else _('None') }}</div>
{#<td class="dataset-details" title="{{ c.datarequest.close_time }}">{{ h.time_ago_from_timestamp(c.datarequest.close_time) if c.datarequest.close_time else _('Not closed yet') }}</td>#}
<div >{{ _('Status') }}:
<div class="dataset-details">
{% if c.datarequest.get('closed', False) %}
<div class="datarequest-label label-closed">
{% trans %}Closed{% endtrans %}
</div>
{% else %}
<div class="label label-open">
{% trans %}Open{% endtrans %}
</div>
{% endif %}
</div>
{#{% if c.datarequest.closed %}
<tr>
<th scope="row" class="dataset-label">{{ _('Accepted Dataset') }}</th>
<td class="dataset-details">
{% if c.datarequest.accepted_dataset %}
{% link_for c.datarequest.accepted_dataset['title'], controller='package', action='read', id=c.datarequest.accepted_dataset.get('id') %}
{% else %}
{{ _('None') }}
{% endif %}
</td>
</tr>
{% endif %}
#}
<div class='comment-count-wrapper'><i class="icon-comment fa fa-comment"></i> {{ h.get_comments_number(c.datarequest.get('id', '')) }}</span> </div>
{% endblock %}
</section>
{% endblock %} {% endblock %}
{% block primary_content_inner %} {% block primary_content_inner %}
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="controls control-full control-large control-group {{ 'error' if errors and errors.get('Comment') and focus }} editor"> <div class="controls control-full control-large control-group {{ 'error' if errors and errors.get('Comment') and focus }} editor">
{% set markdown_tooltip = "<pre><p>__Bold text__ or _italic text_</p><p># title<br>## secondary title<br>### etc</p><p>* list<br>* of<br>* items</p><p>http://auto.link.ed/</p></pre><p><b><a href='http://daringfireball.net/projects/markdown/syntax' target='_blank'>Full markdown syntax</a></b></p><p class='muted'><b>Please note:</b> HTML tags are stripped out for security reasons</p>" %} {% set markdown_tooltip = "<pre><p>__Bold text__ or _italic text_</p><p># title<br>## secondary title<br>### etc</p><p>* list<br>* of<br>* items</p><p>http://auto.link.ed/</p></pre><p><b><a href='http://daringfireball.net/projects/markdown/syntax' target='_blank'>Full markdown syntax</a></b></p><p class='muted'><b>Please note:</b> HTML tags are stripped out for security reasons</p>" %}
<textarea name="comment" cols="20" rows="6" placeholder="{{ _('Add a new Comment') if not comment_id }}">{{ initial_text }}</textarea> <textarea name="comment" cols="20" rows="9" placeholder="{{ _('Add a new Comment') if not comment_id }}">{{ initial_text }}</textarea>
</div> </div>
<div class="comment-form-actions"> <div class="comment-form-actions">
......
<h2 class="page-heading">
{% block page_heading %}
{{datarequest.title}}
{% endblock %}
</h2>
{{ h.render_markdown(h.get_translated(datarequest, 'description')) }}
<h2 class='comments-heading'>{{_('Comments')}}:</h2> <h2 class='comments-heading'>{{_('Comments')}}:</h2>
...@@ -17,3 +11,4 @@ ...@@ -17,3 +11,4 @@
{{ _('This data request has not been commented yet') }} {{ _('This data request has not been commented yet') }}
</p> </p>
{% endif %} {% endif %}
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<div class="dataset-heading "> <div class="dataset-heading ">
<div class="span1"> <div class="span1">
{% if datarequest.get('closed', False) %} {% if datarequest.get('closed', False) %}
<div class="datarequest-label label-closed"> <div class="label label-closed">
{% trans %}Closed{% endtrans %} {% trans %}Done{% endtrans %}
</div> </div>
{% else %} {% else %}
<div class="label label-open"> <div class="label label-open">
......
{% set title= _('No Data Requests found') if datarequest_count == 0 else '%s datarequest found' % datarequest_count %}
<!--<h2>{{ title }}</h2>!-->
{% block datarequest_search_results_list %} {% block datarequest_search_results_list %}
{% if datarequests %} {% if datarequests %}
......
{% extends "snippets/search_form.html" %}
{% block search_title %}
<h2>
{% set text_query = ungettext('{number} data request found for "{query}"', '{number} data requests found for "{query}"', count) %}
{% set text_query_none = _('No data requests found for "{query}"') %}
{% set text_no_query = ungettext('{number} data proposal found', '{number} data proposals found', count) %}
{% set text_no_query_none = _('No data proposal found') %}
{% if query %}
{%- if count -%}
{{ text_query.format(number=h.localised_number(count), query=query) }}
{%- else -%}
{{ text_query_none.format(query=query) }}
{%- endif -%}
{%- else -%}
{%- if count -%}
{{ text_no_query.format(number=h.localised_number(count)) }}
{%- else -%}
{{ text_no_query_none }}
{%- endif -%}
{%- endif -%}
</h2>
{% endblock %}
\ No newline at end of file
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
{% set sorting_label_prefix = _('Order by') %} {% set sorting_label_prefix = _('Order by') %}
{% if type=='organization' %} {% if type=='organization' %}
{% set sorting = sorting if sorting else [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %} {% set sorting = sorting if sorting else [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %}
{% elif type=='datarequest' %}
{% set sorting = [(_('Date Ascending'), 'asc'), (_('Date Descending'), 'desc')] %}
{% else %} {% else %}
{% set sorting = [ {% set sorting = [
(_('Relevance'), 'score desc, metadata_modified desc'), (_('Relevance'), 'score desc, metadata_modified desc'),
......
...@@ -50,6 +50,10 @@ class TestSelenium: ...@@ -50,6 +50,10 @@ class TestSelenium:
assert 'dataset/'+title in TestSelenium.app.currentUrl() assert 'dataset/'+title in TestSelenium.app.currentUrl()
# def test_search_order(self):
# TestSelenium.app.got_to_url('/dataset/')
@depends(after=test_create_dataset) @depends(after=test_create_dataset)
def test_edit_paths(self): def test_edit_paths(self):
paths = ['/organization/edit/' + test_org, paths = ['/organization/edit/' + test_org,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment