diff --git a/ckanext/dms/assets/FileInputComponent.css b/ckanext/dms/assets/FileInputComponent.css index fc708aa..8ecc4ce 100644 --- a/ckanext/dms/assets/FileInputComponent.css +++ b/ckanext/dms/assets/FileInputComponent.css @@ -16,3 +16,7 @@ #FileInputComponent .field-url-input-group{ margin-bottom: 30px; } + +#FileInputComponent .btn.btn-danger { + padding: 6px 12px; +} diff --git a/ckanext/dms/assets/css/dms-main.css b/ckanext/dms/assets/css/dms-main.css index ed856d6..26a79ea 100644 --- a/ckanext/dms/assets/css/dms-main.css +++ b/ckanext/dms/assets/css/dms-main.css @@ -3435,12 +3435,6 @@ input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} .fade.in { opacity: 1; } @@ -6056,137 +6050,7 @@ button.close { border-color: transparent; border-style: solid; } -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1060; - display: none; - max-width: 276px; - padding: 1px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-style: normal; - font-weight: 400; - line-height: 1.42857143; - line-break: auto; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - white-space: normal; - font-size: 14px; - background-color: #ffffff; - background-clip: padding-box; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -} -.popover.top { - margin-top: -10px; -} -.popover.right { - margin-left: 10px; -} -.popover.bottom { - margin-top: 10px; -} -.popover.left { - margin-left: -10px; -} -.popover > .arrow { - border-width: 11px; -} -.popover > .arrow, -.popover > .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover > .arrow:after { - content: ""; - border-width: 10px; -} -.popover.top > .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999999; - border-top-color: rgba(0, 0, 0, 0.25); - border-bottom-width: 0; -} -.popover.top > .arrow:after { - bottom: 1px; - margin-left: -10px; - content: " "; - border-top-color: #ffffff; - border-bottom-width: 0; -} -.popover.right > .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999999; - border-right-color: rgba(0, 0, 0, 0.25); - border-left-width: 0; -} -.popover.right > .arrow:after { - bottom: -10px; - left: 1px; - content: " "; - border-right-color: #ffffff; - border-left-width: 0; -} -.popover.bottom > .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999999; - border-bottom-color: rgba(0, 0, 0, 0.25); -} -.popover.bottom > .arrow:after { - top: 1px; - margin-left: -10px; - content: " "; - border-top-width: 0; - border-bottom-color: #ffffff; -} -.popover.left > .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999999; - border-left-color: rgba(0, 0, 0, 0.25); -} -.popover.left > .arrow:after { - right: 1px; - bottom: -10px; - content: " "; - border-right-width: 0; - border-left-color: #ffffff; -} -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} -.popover-content { - padding: 9px 14px; -} + .carousel { position: relative; } @@ -10298,35 +10162,8 @@ h4 small { .activity .load-less { margin-bottom: 15px; } -.popover { - width: 300px; -} -.popover .popover-title { - font-weight: bold; - margin-bottom: 0; -} -.popover p.about { - margin: 0 0 10px 0; -} -.popover .popover-close { - float: right; - text-decoration: none; -} -.popover .popover-content { - font-size: 14px; - line-height: 1.42857143; - color: #444444; - word-break: break-all; -} -.popover .popover-content dl { - margin: 0; -} -.popover .popover-content dl dd { - margin-left: 0; - margin-bottom: 10px; -} .activity .item .icon { - background-color: #999999; + background-color: #999999;transition: opacity 0.15s linear; } .activity .item.failure .icon { background-color: #b95252; @@ -10423,36 +10260,7 @@ br.line-height2 { .js .dropdown.open .dropdown-menu { display: block; } -#followee-filter .btn:before, -#followee-filter .btn:after { - display: table; - content: " "; -} -#followee-filter .btn:after { - clear: both; -} -#followee-filter .btn:before, -#followee-filter .btn:after { - display: table; - content: " "; -} -#followee-filter .btn:after { - clear: both; -} -#followee-filter .btn span, -#followee-filter .btn strong { - line-height: 1.5; -} -#followee-filter .btn span { - font-weight: normal; -} -#followee-filter .btn strong { - margin: 0 5px; - white-space: nowrap; - max-width: 90px; - overflow: hidden; - text-overflow: ellipsis; -} + .dashboard-context { position: relative; margin-bottom: 20px; @@ -10473,92 +10281,6 @@ br.line-height2 { height: 21px; background: transparent url("../../../base/images/dashboard-followee-related.png"); } -.popover-followee .popover-title { - display: none; -} -.popover-followee .popover-content { - padding: 0; - border-radius: 3px; -} -.popover-followee .empty { - padding: 10px; -} -.popover-followee .popover-header { - background-color: whiteSmoke; - padding: 5px; - border-bottom: 1px solid #cccccc; - border-radius: 3px 3px 0 0; -} -.popover-followee .popover-header:before, -.popover-followee .popover-header:after { - display: table; - content: " "; -} -.popover-followee .popover-header:after { - clear: both; -} -.popover-followee .popover-header:before, -.popover-followee .popover-header:after { - display: table; - content: " "; -} -.popover-followee .popover-header:after { - clear: both; -} -.popover-followee .popover-header .input-group { - margin-bottom: 0; -} -.popover-followee .popover-header .input-group-addon, -.popover-followee .popover-header input { - margin: 0; -} -.popover-followee .popover-header .input-group-addon { - padding: 4px 8px 4px 12px; - border-right-width: 0; - border-radius: 100px 0 0 100px; -} -.popover-followee .popover-header input { - padding: 4px 12px 4px 8px; - font-size: 13px; - width: 227px; - border-radius: 0 100px 100px 0; -} -.popover-followee .nav { - padding: 0; - margin: 0; - max-height: 205px; - overflow: auto; - border-radius: 0 0 3px 3px; -} -.popover-followee .nav li { - float: none; -} -.popover-followee .nav li a { - display: block; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding: 7px 10px 7px 15px; - margin: 0; - border-radius: 0; -} -.popover-followee .nav li a i { - background-color: #b30006; - color: #ffffff; - margin-right: 11px; - padding: 3px 5px; - line-height: 1; - border-radius: 100px; - -webkit-box-shadow: inset 0 1px 2x rgba(0, 0, 0, 0.2); - box-shadow: inset 0 1px 2x rgba(0, 0, 0, 0.2); -} -.popover-followee .nav li a:hover i { - background-color: #000; -} -.popover-followee .nav li.active a i { - color: #b30006; - background-color: #ffffff; -} .dashboard-me { padding: 15px 15px 0 15px; } diff --git a/ckanext/dms/assets/css/dms.css b/ckanext/dms/assets/css/dms.css index 72bf091..3f65c79 100644 --- a/ckanext/dms/assets/css/dms.css +++ b/ckanext/dms/assets/css/dms.css @@ -1,6 +1,4 @@ /* This file overwrites css from the base ckan theme */ - - body { background: #fff; font-family: 'Inter', serif; @@ -96,25 +94,30 @@ p.small { .promoted-background { width: 100%; - background-image: url("/images/small_piling_documents.png"); + background: linear-gradient(90deg, rgba(1, 1, 1, 0.7), rgba(0, 0, 0, 0.5)), url("/images/small_piling_documents.png"); background-size: cover; background-repeat: no-repeat; + background-position: center; color: #FFFFFF; } @media only screen and (min-width: 468px) { .promoted-background { - background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("/images/medium_piling_documents.png"); + background: linear-gradient(90deg, rgba(1, 1, 1, 0.7), rgba(0, 0, 0, 0.5)), url("/images/medium_piling_documents.png"); background-size: cover; background-repeat: no-repeat; + background-position: center; + } } @media only screen and (min-width: 992px) { .promoted-background { - background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("/images/web_piling_docs.png"); + background: linear-gradient(90deg, rgba(1, 1, 1, 0.7), rgba(0, 0, 0, 0.5)), url("/images/web_piling_docs.png"); background-size: cover; background-repeat: no-repeat; + background-position: center; + } } @@ -215,10 +218,6 @@ p.small { } } -@media (max-width: 769px) { - -} - .masthead .site-search input { width: 180px; height: 40px; @@ -619,7 +618,7 @@ a.tag:hover { color: #990005; } -.add-category{ +.add-category { margin-bottom: 32px; } @@ -628,8 +627,9 @@ a.tag:hover { color: #505050; } -.btn{ - padding: 10px 40px; +.btn.btn-primary, +.btn.btn-danger{ + padding: 10px 40px; } .btn-primary, @@ -720,7 +720,7 @@ a.tag:hover { } .recently-updated .view-all-btn{ - background-color: #990005; + background-color: #212121; } .module-narrow .nav-item > a, .module-narrow .nav-aside li a{ @@ -734,4 +734,374 @@ a.tag:hover { .navbar-toggler .fa.fa-bars { color: #990005 !important; font-size: 22px; -} \ No newline at end of file +} + +.select2-container { + border: none; + box-shadow: none; + padding: 7px 0px; +} + + +/* updates*/ +@media only screen and (max-width: 767px) { + .primary { + padding: 2%; + } + .module-content { + padding: 2%; + } + .box .wrapper, + .wrapper { + border: none; + box-shadow: none; + } + + .input-group-btn .btn.btn-default.btn-lg, + .input-group-btn .btn.btn-default.btn-lg:hover { + background-color: white; + color: #990005; + padding-right: 12px; + padding-left: 12px; + border-left: none; + } + .control-order-by { + width: 100%; + text-align: center; + } + #field-order-by { + background-color: #dddddd; + color: black; + width: auto; + } + .show-filters { + width: 100%; + margin-bottom: 16px; + } + .search-form .search-input-group, + .form-group { + margin-bottom: 20px; + } + #dataset-search-form h1 { + font-weight: 400; + margin-top: 20px; + margin-bottom: 0; + text-align: center; + } + .page_primary_action .btn.btn-primary { + margin-bottom: 0; + width:100%; + } + + .context-info .description { + text-align: justify; + } + + .search-form { + margin-bottom: 0; + } + .dataset-item { + margin-top: 30px; + .dataset-content div:last-child { + text-align: justify; + } + } + .dataset-item .modified { + font-weight: 700; + } + .dataset-resources .badge.badge-default { + font-weight: 400; + padding: 4px; + } + .main { + + } + + .subscribe { + .container { + padding: 0; + } + .highlight-box { + border-radius: 0; + margin-bottom: 0; + } + } + + .category-box { + display: flex; + align-items: center; + padding: 1rem; + margin-bottom: 10px; + + .media-image { + width: 60px; + height: 60px; + object-fit: contain; + } + + .group-text { + margin-left: 1rem; + display: flex; + flex-direction: column; + justify-content: center; + .desc { + height: auto; + } + } + + } + + .page-header { + padding: 0; + .content_action { + float: none; + width: 100%; + } + .nav-tabs { + margin: 0; + width: 100%; + } + a.btn:first-child { + width: 100%; + border: #dddddd thin solid; + } + } + .page-header.module-content { + padding: 0; + } + article .nav-tabs { + margin: 0; + li { + width: 100%; + a { + margin: 0; + } + } + } + + .module-resource div.prose.notes { + text-align: justify; + blockquote { + padding: 0; + border: none; + } + } + + .module-resource .actions { + float: none; + top: 0; + right: 0; + ul { + padding: 0; + margin-bottom: 30px; + li { width: 100%; } + li a, li div.btn-group { width: 100% } + } + } + .container { + padding-right: 30px; + padding-left: 30px; + } + + .main.package-page-main .secondary { + order: 0; + .context-info { + .module-content h1.heading { + display: none; + } + .nums:before { + display: none; + content: none; + } + } + } + + .main.resource-page-main { + .wrapper { + flex-direction: column; + } + .primary { + order: 2; + width: 100%; + } + .module-resource { + order: 1; + width: 100%; + } + .secondary { + order: 3; + width: 100%; + padding-right: 15px; + padding-left: 15px; + .module-content { + margin-top: 16px; + padding: 0; + .btn.btn-light.btn-sm { + width: 100%; + border: #EDE8E8 thin solid; + } + } + + .context-info { + .module-content h1.heading { + display: none; + } + .nums:before { + display: none; + content: none; + } + .nums { + margin-top: 16px; + margin-bottom: 16px; + } + } + } + .module-resource, + .primary, + .secondary { + margin-bottom: 1rem; + } + } +} + + +/* Fix dropdown with bootstrap 5 */ +.dropdown-toggle::after { + content: none; +} + +i.fa.icon.fa-windows { + font-family: 'Font Awesome 6 Brands'; + font-weight: 400; +} + +i.fa.icon.fa-file-pdf-o::before { + content: "\f1c1"; +} + +/* aside is buggy for > 768, < 992 */ +@media only screen and (min-width: 768px) and (max-width: 991px) { + .main { + .wrapper::before { + display: none; + } + aside.secondary { + order: 0; + width: 100%; + padding: 30px; + .context-info .image img { + width: 20%; + height: 20%; + } + } + } + + .main.package-page-search { + aside.secondary { + padding: 0; + } + } + + .main.package-page-main, .main.resource-page-main { + + .wrapper { + flex-direction: column; + } + .primary { + order: 2; + width: 100%; + } + .module-resource { + order: 1; + width: 100%; + } + .secondary { + order: 3; + width: 100%; + padding-right: 30px; + padding-left: 30px; + .module-content { + margin-top: 16px; + padding: 0; + .btn.btn-light.btn-sm { + width: 100%; + border: #EDE8E8 thin solid; + } + } + + .context-info { + .module-content h1.heading { + display: none; + } + .nums:before { + display: none; + content: none; + } + .nums { + margin-top: 16px; + margin-bottom: 16px; + } + } + } + + .module-resource, + .primary, + .secondary + { + margin-bottom: 1rem; + } + #package-info { + margin-bottom: 2rem; + } + } +} + +/* showing filters for the resolution (same as mobile) */ +@media (max-width: 991px) { + + .js .main .secondary .filters { + display: none; + position: fixed; + overflow: auto; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1000; + padding: 10px; + background-color: #000000; + background-color: rgba(0, 0, 0, 0.5); + } + .js body.filters-modal .secondary .filters { + display: block; + } + .js .main .secondary .filters > div { + background-color: #fff; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + overflow: hidden; + } + .js .main .secondary .filters > div .module-footer { + display: none; + } + .js body.filters-modal .secondary .filters .hide-filters { + display: inline-block; + position: absolute; + top: 14px; + right: 17px; + opacity: 0.6; + } + .js body.filters-modal .secondary .filters .hide-filters i { + font-size: 18px; + } + .js .show-filters.btn { + display: inline-block; + } + .filter-list { + margin-top: 26px; + } + .module h1 { + margin-top: 26px; + } +} diff --git a/ckanext/dms/public/images/fjelltopp.png b/ckanext/dms/public/images/fjelltopp.png old mode 100644 new mode 100755 index 8b9afba..74fe388 Binary files a/ckanext/dms/public/images/fjelltopp.png and b/ckanext/dms/public/images/fjelltopp.png differ diff --git a/ckanext/dms/public/images/lighthouse.png b/ckanext/dms/public/images/lighthouse.png new file mode 100755 index 0000000..090f1ab Binary files /dev/null and b/ckanext/dms/public/images/lighthouse.png differ diff --git a/ckanext/dms/react/components/FileInputComponent/src/App.js b/ckanext/dms/react/components/FileInputComponent/src/App.js index 7886e72..2ef604a 100644 --- a/ckanext/dms/react/components/FileInputComponent/src/App.js +++ b/ckanext/dms/react/components/FileInputComponent/src/App.js @@ -1,5 +1,4 @@ import React, { useState, useEffect } from 'react'; -import axios from 'axios'; import ProgressBar from './ProgressBar'; import DisplayUploadedFile from './DisplayUploadedFile'; import UrlUploader from './UrlUploader'; diff --git a/ckanext/dms/react/components/FileInputComponent/src/FileUploader.js b/ckanext/dms/react/components/FileInputComponent/src/FileUploader.js index 584fa66..6843b4a 100644 --- a/ckanext/dms/react/components/FileInputComponent/src/FileUploader.js +++ b/ckanext/dms/react/components/FileInputComponent/src/FileUploader.js @@ -9,11 +9,13 @@ export default function FileUploader({ setUploadError }) { - const getAuthToken = () => - axios.post( + const getAuthToken = () => { + const csrf_field = $('meta[name=csrf_field_name]').attr('content'); + const csrf_token = $('meta[name='+ csrf_field +']').attr('content'); + return axios.post( '/api/3/action/authz_authorize', { scopes: `obj:${orgId}/${datasetName}/*:write` }, - { withCredentials: true } + { withCredentials: true, headers: {'X-CSRFToken': csrf_token} } ) .then(res => res.data.result.token) .catch(error => { @@ -23,6 +25,8 @@ export default function FileUploader({ }); throw error; }); + } + const uploadFile = (client, file) => client.upload(file, orgId, datasetName, progress => setUploadProgress({ @@ -43,6 +47,7 @@ export default function FileUploader({ setUploadProgress({ loaded: 0, total: 1 }); const file = data.open(inputFile); const authToken = await getAuthToken(); + console.log(authToken); const client = new Client(lfsServer, authToken, ['basic']); await uploadFile(client, file); setUploadProgress({ loaded: 100, total: 100 }); diff --git a/ckanext/dms/react/package.json b/ckanext/dms/react/package.json index 0f6a762..0f2d198 100644 --- a/ckanext/dms/react/package.json +++ b/ckanext/dms/react/package.json @@ -3,7 +3,7 @@ "@babel/core": "^7.12.16", "@babel/preset-env": "^7.12.16", "@babel/preset-react": "^7.12.13", - "axios": "^0.28.0", + "axios": "^0.21.1", "babel-loader": "^8.2.2", "bluebird": "^3.7.2", "core-js": "^3.9.1", diff --git a/ckanext/dms/react/yarn.lock b/ckanext/dms/react/yarn.lock index 9ebe05f..cd3c917 100644 --- a/ckanext/dms/react/yarn.lock +++ b/ckanext/dms/react/yarn.lock @@ -2740,15 +2740,6 @@ axios@^0.21.1: dependencies: follow-redirects "^1.10.0" -axios@^0.28.0: - version "0.28.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.28.1.tgz#2a7bcd34a3837b71ee1a5ca3762214b86b703e70" - integrity sha512-iUcGA5a7p0mVb4Gm/sy+FSECNkPFT4y7wt6OM/CDpO/OnNCvSs3PoMG8ibrC9jRoGYU0gUK5pXVC4NPXq6lHRQ== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - axobject-query@^2.0.2: version "2.2.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" @@ -3620,7 +3611,7 @@ colorette@^1.2.1: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -5312,11 +5303,6 @@ follow-redirects@^1.10.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147" integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA== -follow-redirects@^1.15.0: - version "1.15.9" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" - integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -5360,15 +5346,6 @@ fork-ts-checker-webpack-plugin@3.1.1: tapable "^1.0.0" worker-rpc "^0.1.0" -form-data@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" - integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -9312,11 +9289,6 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.1" -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" diff --git a/ckanext/dms/schemas/dataset.yaml b/ckanext/dms/schemas/dataset.yaml index b7082fc..0cd9b3b 100644 --- a/ckanext/dms/schemas/dataset.yaml +++ b/ckanext/dms/schemas/dataset.yaml @@ -87,10 +87,6 @@ dataset_fields: resource_fields: -- field_name: url - label: URL - preset: resource_url_upload - - field_name: name label: Name form_placeholder: eg. Malawi HTC Scale Up Plan diff --git a/ckanext/dms/templates/footer.html b/ckanext/dms/templates/footer.html index a784382..f216c6c 100644 --- a/ckanext/dms/templates/footer.html +++ b/ckanext/dms/templates/footer.html @@ -17,12 +17,13 @@

{% trans %}An open source CKAN project, built for the MoH by Fjelltopp - with generous funding from UNAIDS.{% endtrans %}

+ with generous funding from Lighthouse and UNAIDS.{% endtrans %}

{% endblock %} {% endblock %} diff --git a/ckanext/dms/templates/package/read_base.html b/ckanext/dms/templates/package/read_base.html index 3354a3f..688bd9d 100644 --- a/ckanext/dms/templates/package/read_base.html +++ b/ckanext/dms/templates/package/read_base.html @@ -1,5 +1,7 @@ {% ckan_extends %} +{% block maintag %}
{% endblock %} + {% block content_primary_nav %} {{ h.build_nav_icon(dataset_type ~ '.read', _('Dataset'), id=pkg.id if is_activity_archive else pkg.name, icon='sitemap') }} {{ h.build_nav_icon(dataset_type ~ '.groups', _('Categories'), id=pkg.id if is_activity_archive else pkg.name, icon='users') }} diff --git a/ckanext/dms/templates/package/resource_edit.html b/ckanext/dms/templates/package/resource_edit.html index cb482bd..63db889 100644 --- a/ckanext/dms/templates/package/resource_edit.html +++ b/ckanext/dms/templates/package/resource_edit.html @@ -1,5 +1,7 @@ {% extends "package/resource_edit_base.html" %} +{% block maintag %}
{% endblock %} + {% block subtitle %}{{ _('Edit') }} {{ g.template_title_delimiter }} {{ h.resource_display_name(res) }} {{ g.template_title_delimiter }} {{ h.dataset_display_name(pkg) }}{% endblock %} {% block form %} diff --git a/ckanext/dms/templates/package/resource_read.html b/ckanext/dms/templates/package/resource_read.html new file mode 100644 index 0000000..3b25596 --- /dev/null +++ b/ckanext/dms/templates/package/resource_read.html @@ -0,0 +1,3 @@ +{% ckan_extends %} + +{% block maintag %}
{% endblock %} \ No newline at end of file diff --git a/ckanext/dms/templates/package/search.html b/ckanext/dms/templates/package/search.html index ae316fe..a48dd5e 100755 --- a/ckanext/dms/templates/package/search.html +++ b/ckanext/dms/templates/package/search.html @@ -6,6 +6,8 @@ {% block subtitle %}{{ _(dataset_type.title()) }}{% endblock %} +{% block maintag %}