From 94c252f383cea4d77950dbcb09ed6cdff84ecdb8 Mon Sep 17 00:00:00 2001 From: mohamedsalem401 Date: Tue, 16 Apr 2024 12:30:56 +0200 Subject: [PATCH] updated dataset creation user interface --- .../datasetapproval/assets/css/approval.css | 62 ++++++++- .../package/snippets/review_request.html | 122 +++++++++--------- 2 files changed, 120 insertions(+), 64 deletions(-) diff --git a/ckanext/datasetapproval/assets/css/approval.css b/ckanext/datasetapproval/assets/css/approval.css index cff4787..0fcb3c2 100644 --- a/ckanext/datasetapproval/assets/css/approval.css +++ b/ckanext/datasetapproval/assets/css/approval.css @@ -277,7 +277,7 @@ line-height: 24px; letter-spacing: 0em; text-align: left; - font-family: Calibri; + font-family: Calibri , sans-serif; font-size: 16px; font-weight: 400; line-height: 24px; @@ -290,20 +290,34 @@ display: block; position: relative; padding-left: 35px; - margin-bottom: 12px; + margin-bottom: 24px; cursor: pointer; font-size: 18px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; + width: 548px; + box-sizing: content-box; +} + +.form-label { + font-weight: 400; + font-size: 20px; + line-height: 24px; + font-family: Calibri , sans-serif; +} + +.form-group input[type="text"] { + border-radius: 3px; + height: 37px; } .checkbox label input { position: absolute; opacity: 0; cursor: pointer; - font-family: Calibri; + font-family: Calibri , sans-serif; font-size: 12px; font-weight: 100; line-height: 20px; @@ -328,7 +342,7 @@ .resource-form-buttons { /* there are four buttons in the resource form */ - /* the first button should be aligned left and other buttons should be aligned rigght*/ + /* the first button should be aligned left and other buttons should be aligned right*/ display: flex; justify-content: space-between; @@ -349,4 +363,44 @@ flex-direction: row; justify-content: right; margin-top: 20px; +} + +.btn{ + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 6px 16px; + height: 32px; + border-radius: 5px; + font-family: Calibri , sans-serif; + font-style: normal; + font-weight: 700; + font-size: 16px; + margin-left: 17px; + gap: 2px; +} + +.btn-primary{ + background: #006D84; +} + +.btn-default{ + background: #FFFFFF; + border: 2px solid #006D84; + color: #006D84; +} + +.btn-default:hover, .btn-default:focus{ + border-color: #006D84; + background-color: #FAFAFA; + color: #006D84; +} + +.no-nav .col-md-9{ + width: 100%; +} + +.row{ + background-color: transparent; } \ No newline at end of file diff --git a/ckanext/datasetapproval/templates/package/snippets/review_request.html b/ckanext/datasetapproval/templates/package/snippets/review_request.html index 347b372..764d886 100644 --- a/ckanext/datasetapproval/templates/package/snippets/review_request.html +++ b/ckanext/datasetapproval/templates/package/snippets/review_request.html @@ -7,74 +7,76 @@ {% block secondary %}{% block secondary_content %}{% endblock %}{% endblock %} {% block primary %} -
+
+
{% block stages %} {{ h.snippet('package/snippets/stages.html', stages=['complete', 'complete', 'complete', 'active'], pkg_name=pkg_name, dataset_type=dataset_type) }} {% endblock %} -
+ +
+ {% block primary_content_inner %} +
+ {% block approval %} + {% block approval_heading %} +

{{ _('Request review') }}

+ {% endblock %} + {% block approval_description %} +

{{ _('This is a preview of your dataset. You can either go back to step 2 and edit the dataset before sending to review, or send directly to review and ask for publication. How does the review process work? + ') }}

+ {% endblock %} + {% endblock %} +
+ + + +
+
-
- {% block primary_content_inner %} -
- {% block approval %} - {% block approval_heading %} -

{{ _('Request review') }}

- {% endblock %} - {% block approval_description %} -

{{ _('This is a preview of your dataset. You can either go back to step 2 and edit the dataset before sending to review, or send directly to review and ask for publication. How does the review process work? - ') }}

- {% endblock %} - {% endblock %} -
- - - -
-
- - {% block package_description %} -

- {% block page_heading %} - {{ h.dataset_display_name(pkg) }} - {% if pkg.state.startswith('draft') %} - [{{ _('Draft') }}] - {% endif %} - {% if pkg.state == 'deleted' %} - [{{ _('Deleted') }}] - {% endif %} + {% block package_description %} +

+ {% block page_heading %} + {{ h.dataset_display_name(pkg) }} + {% if pkg.state.startswith('draft') %} + [{{ _('Draft') }}] + {% endif %} + {% if pkg.state == 'deleted' %} + [{{ _('Deleted') }}] + {% endif %} + {% endblock %} +

+ {% block package_notes %} + {% if pkg.notes %} +
+ {{ h.render_markdown(h.get_translated(pkg, 'notes')) }} +
+ {% endif %} + {% endblock %} + {# FIXME why is this here? seems wrong #} + {% endblock %} - - {% block package_notes %} - {% if pkg.notes %} -
- {{ h.render_markdown(h.get_translated(pkg, 'notes')) }} -
- {% endif %} - {% endblock %} - {# FIXME why is this here? seems wrong #} - - {% endblock %} - {% block package_resources %} - {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} - {% endblock %} - - {% block package_tags %} - {% snippet "package/snippets/tags.html", tags=pkg.tags %} - {% endblock %} + {% block package_resources %} + {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} + {% endblock %} - {% block package_additional_info %} - {% snippet "package/snippets/additional_info.html", pkg_dict=pkg %} - {% endblock %} + {% block package_tags %} + {% snippet "package/snippets/tags.html", tags=pkg.tags %} + {% endblock %} -
-
- - - -
-
+ {% block package_additional_info %} + {% snippet "package/snippets/additional_info.html", pkg_dict=pkg %} {% endblock %} -
+ +
+
+ + + +
+
{% endblock %} +
+
+
+{% endblock %}