-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from hotosm/feat/events-page
project - open mapping hub, who we are, impact areas, open mapping hubs, tools and resources, search functionality+page, member group pages done
- Loading branch information
Showing
147 changed files
with
3,274 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 4.2.7 on 2024-07-08 21:16 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('wagtailcore', '0089_log_entry_data_json_null_to_object'), | ||
('core', '0002_alter_partner_partner_logo_alter_partner_partner_url'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='HOTSearchablePage', | ||
fields=[ | ||
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')), | ||
('intro', wagtail.fields.RichTextField(blank=True)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=('wagtailcore.page',), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.7 on 2024-07-08 21:31 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0003_hotsearchablepage'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='TestPagePage', | ||
fields=[ | ||
('hotsearchablepage_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.hotsearchablepage')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=('core.hotsearchablepage',), | ||
), | ||
] |
20 changes: 20 additions & 0 deletions
20
app/core/migrations/0005_remove_hotsearchablepage_intro_delete_testpagepage.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 4.2.7 on 2024-07-08 21:35 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0004_testpagepage'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='hotsearchablepage', | ||
name='intro', | ||
), | ||
migrations.DeleteModel( | ||
name='TestPagePage', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Generated by Django 4.2.7 on 2024-07-09 22:09 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0005_remove_hotsearchablepage_intro_delete_testpagepage'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='HOTSearchablePage', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/events/migrations/0004_eventownerpage_keyword_search_hint_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Generated by Django 4.2.7 on 2024-06-27 18:17 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('events', '0003_eventownerpage_event_read_more_text_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='eventownerpage', | ||
name='keyword_search_hint', | ||
field=models.CharField(default='Search by keyword'), | ||
), | ||
migrations.AddField( | ||
model_name='eventownerpage', | ||
name='results_text', | ||
field=models.CharField(default='Results'), | ||
), | ||
migrations.AddField( | ||
model_name='eventownerpage', | ||
name='search_button_text', | ||
field=models.CharField(default='Search'), | ||
), | ||
migrations.AddField( | ||
model_name='eventownerpage', | ||
name='sort_by_new', | ||
field=models.CharField(default='Sort by New'), | ||
), | ||
migrations.AddField( | ||
model_name='eventownerpage', | ||
name='sort_by_old', | ||
field=models.CharField(default='Sort by Old'), | ||
), | ||
migrations.AddField( | ||
model_name='eventownerpage', | ||
name='sort_by_titlea', | ||
field=models.CharField(default='Sort by Title Alphabetical'), | ||
), | ||
migrations.AddField( | ||
model_name='eventownerpage', | ||
name='sort_by_titlez', | ||
field=models.CharField(default='Sort by Title Reverse Alphabetical'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="mt-4 flex items-center w-fit h-fit" @click="hit()" x-data="{ sort: '{{sort_id}}', hit() {setSortType('{{sort_by}}')} }" x-init="if(sort == params.get('sort')) hit()"> | ||
<input class="checked:bg-hot-red checked:hover:bg-hot-red checked:focus:bg-hot-red" type="radio" name="sort" :id="sort" :value="sort" :checked="(params.get('sort') == sort || (!params.get('sort')) && sort == 'sort.new') ? 'on' : ''"> | ||
<label class="pl-2" :for="sort">{{sort_by}}</label> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
{% load wagtailcore_tags %} | ||
{% load wagtailimages_tags %} | ||
{% load compress %} | ||
{% block body_class %}template-eventownerpage{% endblock %} | ||
{% block extra_css %} | ||
{% compress css %} | ||
{% endcompress css %} | ||
{% endblock extra_css %} | ||
|
||
{% block content %} | ||
<div class="max-w-7xl mx-auto my-10" x-data="{ params: new URLSearchParams((new URL(window.location.href)).search) }"> | ||
<div class="px-6 md:px-10"> | ||
<h1 class="text-h1 font-semibold my-10">{{page.title}}</h1> | ||
<form class="my-10"> | ||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | ||
{% comment %} KEYWORD SEARCH {% endcomment %} | ||
<div class="bg-hot-off-white flex items-center"> | ||
<input class="w-full bg-transparent border-none" placeholder="{{page.keyword_search_hint}}" type="text" name="keyword" :value="params.get('keyword')"> | ||
{% include "ui/components/icon_svgs/SearchIcon.html" with class="text-hot-red mx-3" %} | ||
</div> | ||
|
||
{% comment %} SORT {% endcomment %} | ||
<div class="relative" x-data="{ show: false, setSortType(text) {$refs.sorttype.innerText = text} }" @click.away="show = false"> | ||
<div class="w-full h-full flex justify-between py-2 px-3 bg-hot-off-white items-center cursor-pointer" @click="show = !show"> | ||
<p class="pointer-events-none" x-ref="sorttype"> | ||
{{page.sort_by_new}} | ||
</p> | ||
{% include "ui/components/icon_svgs/LinkCaret.html" with class="rotate-90 text-hot-red" %} | ||
</div> | ||
<div class="absolute z-20 bg-hot-off-white p-4 w-full" x-show="show"> | ||
<hr class="border-b-2"> | ||
{% include "./components/EventsSortOption.html" with sort_by=page.sort_by_new sort_id="sort.new" %} | ||
{% include "./components/EventsSortOption.html" with sort_by=page.sort_by_old sort_id="sort.old" %} | ||
{% include "./components/EventsSortOption.html" with sort_by=page.sort_by_titlea sort_id="sort.titlea" %} | ||
{% include "./components/EventsSortOption.html" with sort_by=page.sort_by_titlez sort_id="sort.titlez" %} | ||
</div> | ||
</div> | ||
|
||
<div class="bg-hot-red text-white font-semibold"> | ||
<input type="submit" value="{{page.search_button_text}}" class="bg-transparent w-full h-full cursor-pointer py-2"> | ||
</div> | ||
</div> | ||
</form> | ||
|
||
{% comment %} EVENT ITEMS {% endcomment %} | ||
<h2 class="text-h2 font-bold my-8">{{events_paginator.count}} {{page.results_text}}</h2> | ||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-10"> | ||
{% for event in events %} | ||
{% include "ui/components/events/EventPreviewBlockEvent.html" with event=event showimage=True %} | ||
{% endfor %} | ||
</div> | ||
|
||
{% comment %} PAGE NAVIGATION {% endcomment %} | ||
{% include "ui/components/utilities/PaginatorNavigation.html" with paginator=events_paginator current_page=current_page %} | ||
</div> | ||
</div> | ||
{% endblock %} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class GetInvolvedConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'app.get_involved' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 4.2.7 on 2024-07-03 18:17 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('wagtailcore', '0089_log_entry_data_json_null_to_object'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='GetInvolvedPage', | ||
fields=[ | ||
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=('wagtailcore.page',), | ||
), | ||
] |
Oops, something went wrong.