Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
ckanext-odsh
Commits
e728afff
Commit
e728afff
authored
1 year ago
by
Thorge Petersen
Browse files
Options
Downloads
Patches
Plain Diff
Prevent empty divs in distribution item when name or description is empty
parent
f3b82e57
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!51
Display contact information on dataset page and use text-ellipsis for long description texts
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ckanext/odsh/templates/package/snippets/resource_item.html
+25
-23
25 additions, 23 deletions
ckanext/odsh/templates/package/snippets/resource_item.html
with
25 additions
and
23 deletions
ckanext/odsh/templates/package/snippets/resource_item.html
+
25
−
23
View file @
e728afff
...
...
@@ -10,33 +10,35 @@
<li
class=
"resource-item"
data-id=
"{{ res.id }}"
>
<div
class=
"resource-title-container"
>
<div
class=
"resource-title"
title=
"{{ rtitle }}"
>
{% if res.name %}
{% if res.name %}
<div
class=
"resource-title"
title=
"{{ rtitle }}"
>
<a
href=
"{{ download }}"
title=
"{{ res.name }}"
>
{{ h.resource_display_name(res) | truncate(120) }}
</a>
{% endif %}
</div>
{% block resource_item_description %}
<div
class=
"resource-description"
>
{% if res.description %}
<p
class=
"description"
id=
"resource-description-{{ res.id }}"
>
{{ h.markdown_extract(res.description, extract_length=0) }}
</p>
<div
class=
"ellipsis-action"
data-target=
"#resource-description-{{ res.id }}"
data-max-height=
"75"
>
<div
class=
"ellipsis-overlay"
></div>
<a
title=
"Read more"
class=
"readmore"
href=
"#"
>
{% trans %}Read more »{% endtrans %}
</a>
<a
title=
"Read less"
class=
"readless"
href=
"#"
>
{% trans %}« Read less{% endtrans %}
</a>
</div>
{% endif %}
{% if resource_size %}
<p>
{{ _('File size') }}: {{ resource_size }}
</p>
{% endif %}
{% set number_of_pages = res.get('number_of_pages') %}
{% if number_of_pages%}
<p>
{{ _('Number of pages') }}: {{ number_of_pages }}
</p>
{% endif %}
</div>
{% endif %}
{% block resource_item_description %}
{% if res.description or resource_size %}
<div
class=
"resource-description"
>
{% if res.description %}
<p
class=
"description"
id=
"resource-description-{{ res.id }}"
>
{{ h.markdown_extract(res.description, extract_length=0) }}
</p>
<div
class=
"ellipsis-action"
data-target=
"#resource-description-{{ res.id }}"
data-max-height=
"75"
>
<div
class=
"ellipsis-overlay"
></div>
<a
title=
"Read more"
class=
"readmore"
href=
"#"
>
{% trans %}Read more »{% endtrans %}
</a>
<a
title=
"Read less"
class=
"readless"
href=
"#"
>
{% trans %}« Read less{% endtrans %}
</a>
</div>
{% endif %}
{% if resource_size %}
<p>
{{ _('File size') }}: {{ resource_size }}
</p>
{% endif %}
<!-- {% set number_of_pages = res.get('number_of_pages') %}
{% if number_of_pages%}
<p>{{ _('Number of pages') }}: {{ number_of_pages }}</p>
{% endif %} -->
</div>
{% endif %}
{% endblock %}
<div
class=
"resource-icons"
>
{% block resource_item_explore_links %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment