Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev into prod #6337

Merged
merged 31 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9acc3b7
HDX-9812 homepage improvements for June
ccataalin May 10, 2024
46d7783
HDX-9812 improve flash_messages & fix horizontal scrollbar on homepage
ccataalin May 10, 2024
24295e0
HDX-9812 force aspect ratio, add rounded corners for images, adjust f…
ccataalin May 10, 2024
6396e56
HDX-9812 3:2 image ratio, display 4 items, add mobile carousel, renam…
ccataalin May 21, 2024
00e176e
Merge pull request #6325 from OCHA-DAP/feature/HDX-9812-extra-homepag…
ccataalin May 21, 2024
0e5514b
HDX-9812 improve logo alignment and display footer below the page fold
ccataalin May 21, 2024
23bddd6
HDX-9822 HAPI landing page
ccataalin May 23, 2024
824aabd
HDX-9839 Signals landing page
ccataalin May 24, 2024
68ad9fb
Merge pull request #6328 from OCHA-DAP/feature/HDX-9839-signals-landi…
ccataalin May 24, 2024
292d8ae
HDX-9839 add IDMC logo, fix breadcrumb name & align regions
ccataalin May 24, 2024
50e10a9
Merge pull request #6327 from OCHA-DAP/feature/HDX-9822-hapi-landing-…
danmihaila May 27, 2024
8032c54
HDX-9822 & 9839 add analytics
ccataalin May 27, 2024
07f2149
Merge pull request #6329 from OCHA-DAP/feature/HDX-9822-hapi-landing-…
alexandru-m-g May 27, 2024
a01341d
HDX-9812 three carousel images instead of four
ccataalin May 28, 2024
9b47b19
HDX-9822 & HDX-9839 update faq ids
ccataalin May 28, 2024
ee69190
Merge pull request #6330 from OCHA-DAP/feature/HDX-9822-hapi-landing-…
danmihaila May 28, 2024
17e944b
Merge pull request #6324 from OCHA-DAP/feature/HDX-9812-homepage-impr…
danmihaila May 28, 2024
0ffa063
HDX-9839 open links in a new tab, centre subscribe button, update emb…
ccataalin May 29, 2024
7dd53e3
HDX-9861 preselect org when requesting membership
ccataalin May 29, 2024
29b5e11
HDX-9833 remove orgs that do not allow membership requests during onb…
ccataalin May 29, 2024
49ab0a2
Merge pull request #6331 from OCHA-DAP/feature/HDX-9839-signals-landi…
danmihaila May 29, 2024
5966c99
HDX-9809 onboarding phase 2 improvements
ccataalin May 30, 2024
fe8f519
HDX-9812 update footer logo
ccataalin May 30, 2024
25f62cd
Merge pull request #6335 from OCHA-DAP/feature/HDX-9812-homepage-impr…
danmihaila May 30, 2024
a9c9d2d
Merge pull request #6333 from OCHA-DAP/feature/HDX-9833-remove-orgs-n…
danmihaila May 30, 2024
fcce7f7
Merge pull request #6334 from OCHA-DAP/feature/HDX-9861-preselect-org
danmihaila May 30, 2024
97df74d
HDX-9797 - Resource name text cut off too soon
aalecs May 30, 2024
c2beb88
HDX-9809 update tests
ccataalin May 30, 2024
e8dbc2e
Merge pull request #6336 from OCHA-DAP/HDX-9797-resource_name_text_cu…
danmihaila May 31, 2024
5206bc0
Merge pull request #6332 from OCHA-DAP/feature/HDX-9809-onboarding-ph…
danmihaila May 31, 2024
4051dd1
Update version.py
danmihaila Jun 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _fetch_org_list_metadata(self):

if len(self.all_org_list) > 0:
for o in self.all_org_list:
if not o.get('closed_organization'):
if not o.get('closed_organization') and o.get('request_membership') != 'false':
self.active_org_dict[o.get('id')] = o.get('display_name')
else:
self.inactive_org_dict[o.get('id')] = o.get('display_name')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@


@validator_args
def request_new_organization_schema(not_empty, ignore_missing, hdx_url_validator):
def request_new_organization_schema(not_empty, ignore_missing):
schema = {
'name': [not_empty, unicode_safe],
'description': [not_empty, unicode_safe],
'website': [ignore_missing, unicode_safe, hdx_url_validator],
'website': [ignore_missing, unicode_safe],
'role': [not_empty, unicode_safe],
'data_type': [not_empty, unicode_safe],
'data_already_available': [not_empty, unicode_safe],
'data_already_available_link': [ignore_missing, unicode_safe, hdx_url_validator],
'data_already_available_link': [ignore_missing, unicode_safe],
}
return schema

Expand Down
3 changes: 2 additions & 1 deletion ckanext-hdx_org_group/ckanext/hdx_org_group/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def get_validators(self):
def _modify_group_schema(self, schema):
schema.update({
'description': [tk.get_validator('not_empty')],
'org_url': [tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')],
'org_url': [tk.get_validator('not_missing'), tk.get_validator('hdx_url_validator'),
tk.get_converter('convert_to_extras')],
'fts_id': [tk.get_validator('hdx_org_keep_prev_value_if_empty_unless_sysadmin'),
tk.get_validator('ignore_missing'),
tk.get_converter('convert_to_extras')],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def test_new_org_request(self):
self._get_action('hdx_send_new_org_request')(
{'model': model, 'session': model.Session},
{'title': 'Org Title', 'description': 'Org Description',
'org_url': 'http://test-org.com/',
'org_url': 'https://test-org.com/',
'your_name': 'Some Name', 'your_email': '[email protected]'}
)
assert False, 'anon user should not be allowed to send new org request'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_create_org_api(self):
new_org_dict = {
'name': 'test_org_dd',
'title': 'Test Org D',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand All @@ -48,7 +48,7 @@ def test_create_org_api(self):
'id': org_dict.get('id'),
'name': 'test_org_dd',
'title': 'Test Org DD',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand All @@ -65,7 +65,7 @@ def test_fts_id_api(self):
'name': 'test_org_d',
'title': 'Test Org D',
'fts_id': '123456',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand Down Expand Up @@ -163,7 +163,7 @@ def test_fts_is_controller(self):
'name': 'test_org_d',
'title': 'Test Org D',
'fts_id': '123456',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'save': 'save'
Expand All @@ -189,7 +189,7 @@ def test_fts_is_controller(self):
'id': org_dict.get('id'),
'name': 'test_org_d',
'title': 'Test Org E',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'save': 'save'
Expand All @@ -207,7 +207,7 @@ def test_fts_is_controller(self):
'name': 'test_org_d',
'title': 'Test Org E',
'fts_id': '789',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'save': 'save'
Expand Down Expand Up @@ -240,7 +240,7 @@ def test_create_org_api(self):
new_org_dict = {
'name': 'test_org_dd',
'title': 'Test Org D',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand All @@ -254,7 +254,7 @@ def test_create_org_api(self):
'id': org_dict.get('id'),
'name': 'test_org_dd',
'title': 'Test Org DD',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand All @@ -271,7 +271,7 @@ def test_user_survey_url_api(self):
'name': 'test_org_d',
'title': 'Test Org D',
'user_survey_url': self.USER_SURVEY_URL,
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand Down Expand Up @@ -372,7 +372,7 @@ def test_user_survey_url_controller(self):
'name': 'test_org_d',
'title': 'Test Org D',
'user_survey_url': self.USER_SURVEY_URL,
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'save': 'save'
Expand All @@ -398,7 +398,7 @@ def test_user_survey_url_controller(self):
'id': org_dict.get('id'),
'name': 'test_org_d',
'title': 'Test Org E',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'save': 'save'
Expand All @@ -418,7 +418,7 @@ def test_user_survey_url_controller(self):
'name': 'test_org_d',
'title': 'Test Org E',
'user_survey_url': self.USER_SURVEY_UPDATED_URL,
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'save': 'save'
Expand Down Expand Up @@ -452,7 +452,7 @@ def test_create_org_api(self):
new_org_dict = {
'name': 'test_org_dd',
'title': 'Test Org D',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand All @@ -467,7 +467,7 @@ def test_create_org_api(self):
'id': org_dict.get('id'),
'name': 'test_org_dd',
'title': 'Test Org DD',
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand All @@ -486,7 +486,7 @@ def test_closed_organization_api(self):
'name': 'test_org_d',
'title': 'Test Org D',
'closed_organization': True,
'org_url': 'www.exampleorganization.org',
'org_url': 'https://www.exampleorganization.org',
'description': 'just a simple description',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ def test_request_organization(self, _mail_new_membership_request, _check_request
new_wrong_org_dict['data_already_available_link'] = 'www.no.com123'
result = app.post(url, data=new_wrong_org_dict, extra_environ=auth_user, follow_redirects=True)
assert result.status_code == 200
assert result.body.count('Please provide a valid URL') == 2
assert result.body.count('Please provide a valid URL') == 0

new_wrong_org_dict['website'] = 'http://www.no.com'
new_wrong_org_dict['data_already_available_link'] = 'http://www.no.com'
result = app.post(url, data=new_wrong_org_dict, extra_environ=auth_user, follow_redirects=True)
assert result.status_code == 200
assert result.body.count('Please provide a valid URL') == 2
assert result.body.count('Please provide a valid URL') == 0

new_wrong_org_dict['website'] = 'no.com'
new_wrong_org_dict['data_already_available_link'] = 'no.com'
result = app.post(url, data=new_wrong_org_dict, extra_environ=auth_user, follow_redirects=True)
assert result.status_code == 200
assert result.body.count('Please provide a valid URL') == 2
assert result.body.count('Please provide a valid URL') == 0
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'title': 'Hdx Test Org',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'org_acronym': 'HTO',
'org_url': 'http://test-org.test',
'org_url': 'https://test-org.test',
'description': 'This is a test organization',
'users': [{'name': 'testsysadmin'}, {'name': 'janedoe3'}]
}
Expand Down Expand Up @@ -130,7 +130,7 @@ def test_create_with_group(self):

def test_create_dataset_as_normal_user(self):
normal_user = factories.User()
org = factories.Organization(user=normal_user, org_url='http://test.local/', hdx_org_type='donor')
org = factories.Organization(user=normal_user, org_url='https://test.local/', hdx_org_type='donor')

package = {
'package_creator': 'test function',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'title': 'Hdx Test Org',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'org_acronym': 'HTO',
'org_url': 'http://test-org.test',
'org_url': 'https://test-org.test',
'description': 'This is a test organization',
'users': [{'name': 'testsysadmin', 'capacity': 'admin'}, {'name': 'joeadmin', 'capacity': 'admin'}]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'title': 'Hdx Test Org',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'org_acronym': 'HTO',
'org_url': 'http://test-org.test',
'org_url': 'https://test-org.test',
'description': 'This is a test organization',
'users': [{'name': 'testsysadmin'}, {'name': 'tester', 'capacity': 'member'}]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _create_package_by_user(cls, pkg_name, user, create_org_and_group=True):
:rtype: str
'''
if create_org_and_group:
factories.Organization(name='test_owner_org', org_url='http://example.org/',
factories.Organization(name='test_owner_org', org_url='https://example.org/',
hdx_org_type=ORGANIZATION_TYPE_LIST[0][1],
users=[{'name': 'testsysadmin', 'capacity': 'admin'}]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _create_test_data(cls):
'title': 'Hdx Test Org',
'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1],
'org_acronym': 'HTO',
'org_url': 'http://test-org.test',
'org_url': 'https://test-org.test',
'description': 'This is a test organization',
'users': [{'name': 'testsysadmin'}, {'name': 'janedoe3'}]
}
Expand Down
16 changes: 15 additions & 1 deletion ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,22 @@
background: #1ebfb3;
}
#carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item {
width: 215px;
width: calc(100% - 50px);
margin: auto;
float: none;
}
#carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item .sub-item-image {
height: auto;
}
#carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item .sub-item-image .graphic {
width: 100%;
height: auto;
aspect-ratio: 1.5;
border-radius: 6px;
}
#carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item .sub-item-action {
border-radius: 6px;
}
#carousel-config-main .carousel-item .sub-item {
width: 215px;
margin-right: 40px;
Expand Down Expand Up @@ -116,6 +128,8 @@
#carousel-config-main .carousel-item .sub-item .sub-item-caption {
text-align: left;
color: #fff;
height: 40px;
overflow: hidden;
}
#carousel-config-main .carousel-item .sub-item .sub-item-caption .description {
font-family: 'Gotham-Book', sans-serif;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
var html = this.template(template_data);

this.$el.html(html);
this.$el.attr("class", this.model.attributes.tab_open ? 'col-12' : 'col-4');
this.$el.attr("class", this.model.attributes.tab_open ? 'col-12' : 'col-6');
this.$el.find("select").select2();

return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
display: block;
}
.hdxLogo .logo .logo-img {
background-image: url("/images/homepage/logo-hdx.svg");
background-image: url("/images/homepage/logo-hdx-accr-blk.svg");
background-repeat: no-repeat;
background-size: 126px 31px;
background-position: left center;
width: 126px;
height: 31px;
min-width: 126px;
min-height: 31px;
height: 30px;
margin-top: 1px;
}
/* END HDX Version display */
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,11 @@ ul.dataset-resources li + li.label-icons {
font-weight: 400;
font-size: 14px;
}
.sspRegular16 {
font-family: 'Source Sans Pro', sans-serif;
font-weight: 400;
font-size: 16px;
}
.sspBold16 {
font-family: 'Source Sans Pro', sans-serif;
font-weight: 700;
Expand Down Expand Up @@ -1454,6 +1459,16 @@ ul.dataset-resources li + li.label-icons {
#homepage-alerts .flash-messages {
background-color: transparent;
}
#homepage-alerts .paddingRowHack {
margin-left: 0;
margin-right: 0;
}
#homepage-alerts .paddingRowHack .paddingLeftHack {
padding-left: 0;
}
#homepage-alerts .paddingRowHack .paddingRightHack {
padding-right: 0;
}
/* END Style Bootstrap Flash messages*/
/* Common Classes */
.mTop60 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
font-weight: 400;
font-size: 14px;
}
.sspRegular16 {
font-family: 'Source Sans Pro', sans-serif;
font-weight: 400;
font-size: 16px;
}
.sspBold16 {
font-family: 'Source Sans Pro', sans-serif;
font-weight: 700;
Expand Down Expand Up @@ -96,6 +101,16 @@
#homepage-alerts .flash-messages {
background-color: transparent;
}
#homepage-alerts .paddingRowHack {
margin-left: 0;
margin-right: 0;
}
#homepage-alerts .paddingRowHack .paddingLeftHack {
padding-left: 0;
}
#homepage-alerts .paddingRowHack .paddingRightHack {
padding-right: 0;
}
/* END Style Bootstrap Flash messages*/
/* Common Classes */
.mTop60 {
Expand Down
6 changes: 3 additions & 3 deletions ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@
line-height: 20px;
}
.hdx-footer .logo-gray {
height: 40px;
height: 30px;
margin-bottom: 10px;
}
.hdx-footer .match-logo-margin {
margin-top: 50px;
margin-top: 40px;
}
@media (max-width: 768px) {
.hdx-footer .match-logo-margin {
margin-top: 30px;
}
}
.hdx-footer .other-services img {
max-height: 40px;
max-height: 30px;
max-width: 100%;
}
.hdx-footer .other-services img.logo-hdx {
Expand Down
Loading
Loading