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

Merge branch 'master' into odpsh-30-new-datasets

parents 9a1294d5 9d183318
No related branches found
No related tags found
No related merge requests found
Showing
with 155 additions and 51 deletions
No preview for this file type
......@@ -423,6 +423,7 @@ msgstr "Datensatz vorschlagen"
msgid "NEW"
msgstr "NEU"
msgid "Add New Comment"
msgstr "Kommentieren"
......@@ -431,3 +432,23 @@ msgstr "Veröffentlicht"
msgid "Suggester"
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
background-color: #003064;
}
.label.label-closed
{
color: white;
background-color: #DBDBDB;
}
.datarequest-subtitle
{
font-size: 12px;
......@@ -1987,6 +1993,8 @@ p.package-info-categorie
padding: 3px 3px 1px 3px;
font-size: 14px;
margin-right: 4px;
}
.comments-heading{
color: black;
font-weight: normal;
......@@ -1996,7 +2004,8 @@ p.package-info-categorie
.odsh-comment-wrapper{
padding-left: 0px;
max-width: 400px;
max-width: 470px;
margin-bottom: 25px;
}
.odsh-comment-wrapper .controls{
......@@ -2036,4 +2045,35 @@ p.package-info-categorie
.datarequest .additional-info{
font-weight: normal;
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 @@
{% endblock %}
{% 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 %}
{% block main_content %}
......
......@@ -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' %}
{% 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 %}
{% if h.check_access('comment_datarequest', {'id':c.datarequest.id }) %}
......@@ -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 %}
</div>
{% 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 %}
\ No newline at end of file
......@@ -4,7 +4,8 @@
<section class="module">
<div class="module-content">
{% 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)}}
{% if h.check_access('create_datarequest') %}
<div class="add_request_container">
......@@ -16,9 +17,16 @@
</section>
{% endblock %}
{% block secondary_content %}
{% block secondary%}
{% endblock %}
{#{% block secondary_content %}
{{ super() }}
{% for facet in c.facet_titles %}
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }}
{% endfor %}
{% endblock %}#}
{% block pre_wrap %}
</form>
{% endblock %}
\ No newline at end of file
......@@ -25,40 +25,7 @@
{{ h.build_nav_icon('show_datarequest', _('Data Request'), id=datarequest_id) }}
{% endblock %}
{% block secondary_content %}
<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>
{% block secondary %}
{% endblock %}
{% block primary_content_inner %}
......
......@@ -14,7 +14,7 @@
<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>" %}
<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 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>
......@@ -17,3 +11,4 @@
{{ _('This data request has not been commented yet') }}
</p>
{% endif %}
......@@ -9,8 +9,8 @@
<div class="dataset-heading ">
<div class="span1">
{% if datarequest.get('closed', False) %}
<div class="datarequest-label label-closed">
{% trans %}Closed{% endtrans %}
<div class="label label-closed">
{% trans %}Done{% endtrans %}
</div>
{% else %}
<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 %}
{% 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 @@
{% set sorting_label_prefix = _('Order by') %}
{% if type=='organization' %}
{% 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 %}
{% set sorting = [
(_('Relevance'), 'score desc, metadata_modified desc'),
......
......@@ -50,6 +50,10 @@ class TestSelenium:
assert 'dataset/'+title in TestSelenium.app.currentUrl()
# def test_search_order(self):
# TestSelenium.app.got_to_url('/dataset/')
@depends(after=test_create_dataset)
def test_edit_paths(self):
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