Skip to content

Commit

Permalink
Merge branch 'main' into feature/passwordless-login-signup
Browse files Browse the repository at this point in the history
* main:
  Custom applicant dashboard header (#3587)
  Upgrade wagtail to 5x (#3627)
  Upgrade to Django 4.1.x (#3398)
  docs: update the links to images and some references to pages (#3641)
  Update the query text on all.html (#3638)
  Update to  django-3.2.23. (#3637)
  • Loading branch information
theskumar committed Nov 7, 2023
2 parents db094a0 + a84c939 commit a54e8c1
Show file tree
Hide file tree
Showing 25 changed files with 168 additions and 247 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started/contributing/code-contributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ class MyTestCase(TestCase):
pass
```

This is implemented by default for the [BaseViewTestCase](testing.md#test-class-helpers)
This is implemented by default for the `BaseViewTestCase`

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ View our [Roadmap](https://github.com/HyphaApp/hypha/wiki/Roadmap) for upcoming
## Technology

* Built with [Django](https://www.djangoproject.com/), PostgreSQL and [Wagtail](https://wagtail.io/)
* Deploy with [Heroku](/setup/deployment/heroku), [Docker](/setup/deployment/docker/), or [your own server](/setup/deployment/stand-alone).
* Deploy with [Heroku](./setup/deployment/heroku.md), [Docker](./setup/deployment/docker.md), or [your own server](./setup/deployment/stand-alone.md).
6 changes: 3 additions & 3 deletions docs/references/user-roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ The **Partner** role could be access, edit, and communicate about a specific app

The Partner could only review applications that has been assigned to them. Applications assigned to the Partner are available on their dashboard.

![](/assets/partner_dashboard_assign_submission.png)
![](../assets/partner_dashboard_assign_submission.png)

The Partner role could be associated or assigned to an application by clicking on Partner button in the **Actions to take** > Assign.

![](/assets/submission_how-to-assign-partner.png)
![](../assets/submission_how-to-assign-partner.png)

## Reviewer

Expand Down Expand Up @@ -86,7 +86,7 @@ An **Applicant** can:
* Contact staff regarding own application
* Track the status of their application(s) on their platform

![](/assets/staff_applicant_dashboard.png)
![](../assets/staff_applicant_dashboard.png)


## Additional Roles
Expand Down
18 changes: 8 additions & 10 deletions docs/user-guides/applications/creating-submisison-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ All admin actions associated with applications can be access through the “Appl

There are several types of Forms in the WagTail Amin. Forms are used to create a Fund.

![](/assets/setup_form-1.png)
![](../../assets/setup_form-1.png)

**Application Form**

![](/assets/setup_form-2.png)
![](../../assets/setup_form-2.png)

**Review Form**

![](/assets/setup_form-3.png)
![](../../assets/setup_form-3.png)

**Determination Form**

![](/assets/setup_form-4.png)
![](../../assets/setup_form-4.png)


****
Expand Down Expand Up @@ -51,7 +51,7 @@ Currently users can copy, clone, or duplicate a Fund before creating a new form.
1. Open Apply and click the bird icon on the bottom-right corner, then click the “Go to Wagtail admin” pop-up
2. Click `Apply` > `Rounds`

![](/assets/setup_round-select-round-from-nav.png)
![](../../assets/setup_round-select-round-from-nav.png)

3\. Go to the round and click the Edit button:

Expand All @@ -63,14 +63,12 @@ Currently users can copy, clone, or duplicate a Fund before creating a new form.

6\. Enter the Lead's name

![](/assets/setup_round-enter-lead-name.jpeg)
![](../../assets/setup_round-enter-lead-name.jpeg)

7\. Check to ensure the correct reviewers are highlighted

![](/assets/setup_round-select-reviewers.png)
![](../../assets/setup_round-select-reviewers.png)

8\. You could save a draft or publish. Publish means the application will be publicly visible to applicants.

![](/assets/setup_round-publish-options.png)


![](../../assets/setup_round-publish-options.png)
10 changes: 5 additions & 5 deletions docs/user-guides/creating-a-user-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Creating superuser

```
```console
python manage.py createsuperuser
```

Expand All @@ -21,19 +21,19 @@ Creating additional users and assigning them Roles is done in Wagtail by someone

In the WagTail Admin, you could create a new user account as well as assign a role to a user account by clicking on the "Add User" button on the far right-hand corner of the screen. You can also search for users in the search bar. User roles are essential to WagTail and the Hypha platform. System Administrators are able to oversee user accounts and manage the level of access for different users.

![](/assets/manage_user-nav.jpg)
![](../assets/manage_user-nav.jpg)

The "Add User" form will request your email, name, and role within the platform.

![](/assets/manage_user-add-user.jpg)
![](../assets/manage_user-add-user.jpg)

Selecting a role with enable to administrative access within the platform. Commonly used roles within the platform are **Staff**, **Partner**, and **Reviewer**.

![](/assets/manage_user-update-group.jpg)
![](../assets/manage_user-update-group.jpg)


### Filtering by Roles and Status

You could quickly search for user groups and their status (ie active or inactive) using the filter. The search function shows the user account's most recent login date.

![](/assets/manage_user-apply-filter.jpg)
![](../assets/manage_user-apply-filter.jpg)
4 changes: 2 additions & 2 deletions docs/user-guides/login.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

**Step 2**: Click the "My \[Organization Name]" button in the upper-right corner of the screen.

![Screenshot of the main page of sandbox.opentech.fund. Top banner of the page has "Hypha" logo in upper left, across top are links to "Funds," "Labs," "Results," "News," "About" and "Search" (a magnifying glass icon). Two buttons in the upper right show "(person icon) My SB" and "Select Language (dropdown arrow)". The main portion of the page has a blue pixellated background with white sans serif large text that reads "SANDBOX TEST SITE" and in smaller text below "It will reset every 24h. So test all you want. Below this text is clickable text that says "Learn more how to use it". Pinned to the footer of the window in the right-hand corner is a button labeled "Apply"](/assets/how-to-login-nav.png)
![Screenshot of the main page of sandbox.opentech.fund. Top banner of the page has "Hypha" logo in upper left, across top are links to "Funds," "Labs," "Results," "News," "About" and "Search" (a magnifying glass icon). Two buttons in the upper right show "(person icon) My SB" and "Select Language (dropdown arrow)". The main portion of the page has a blue pixellated background with white sans serif large text that reads "SANDBOX TEST SITE" and in smaller text below "It will reset every 24h. So test all you want. Below this text is clickable text that says "Learn more how to use it". Pinned to the footer of the window in the right-hand corner is a button labeled "Apply"](../assets/how-to-login-nav.png)


**Step 3**: Enter your credentials in the "Email address" and "Password" fields & click "Login"

![Screenshot of the login page of sandbox.opentech.fund, as above, but with "Email address\*" and "Password\*" text-entry boxes filled in with "[email protected]" and "\*\*\*\*\*\*\*\*\*\*\*"](/assets/how-to-login-login-page.png)
![Screenshot of the login page of sandbox.opentech.fund, as above, but with "Email address" and "Password" text-entry boxes filled in with "[email protected]"](../assets/how-to-login-login-page.png)
1 change: 1 addition & 0 deletions hypha/apply/categories/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def get_categories_as_choices():
class CategoryQuestionBlock(OptionalFormFieldBlock):
class Meta:
template = "stream_forms/render_list_field.html"
icon = "folder-open-1"

category = ModelChooserBlock(required=True, choices=get_categories_as_choices)
multi = BooleanBlock(label=_("Multi select"), required=False)
Expand Down
147 changes: 79 additions & 68 deletions hypha/apply/dashboard/templates/dashboard/applicant_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,83 +4,94 @@

{% block title %}{% trans "Dashboard" %}{% endblock %}

{% block content %}
{% adminbar %}
{% slot header %}{% trans "Dashboard" %}{% endslot %}
{% slot sub_heading %}{% trans "An overview of active and past submissions and projects" %}{% endslot %}

<div class="wrapper wrapper--cta-box">
<h3 class="text-xl mb-0">{% trans "Submit a new application" %}</h3>
<p class="mt-0 mb-4 text-fg-muted text-sm">{% trans "Apply now for our open rounds" %}</p>
<a class="button button--primary" href="{% pageurl APPLY_SITE.root_page %}" class="button">{% trans "Apply" %}</a>
</div>
{% endadminbar %}

<div class="wrapper wrapper--large wrapper--inner-space-medium">
{% if my_active_submissions %}
<div class="mb-10">
<div class="flex">
<h2 class="font-light flex-1">{% trans "My active submissions" %}</h2>
</div>
{% for submission in my_active_submissions %}
<div class="wrapper wrapper--status-bar-outer">
<div class="wrapper wrapper--status-bar-inner">
<div class="mt-5 ml-4">
<h4 class="heading mb-2 font-bold"><a class="link link--underlined" href="{% url 'funds:submissions:detail' submission.id %}">{{ submission.title }}</a></h4>
<p class="m-0 text-gray-400">{% trans "Submitted on " %} {{ submission.submit_time.date }} {% trans "by" %} {{ submission.user.get_full_name }}</p>
</div>
{% status_bar submission.workflow submission.phase request.user css_class="status-bar--small" %}
{% block content_wrapper %}
<main class="wrapper wrapper--large wrapper--main bg-light-grey" id="main">
{% block content %}
<div class="admin-bar">
<div class="admin-bar__inner wrapper--applicant-dashboard">
<div class="my-auto">
<h1 class="heading heading--no-margin font-bold">{% trans "My dashboard" %}</h1>
<p class="m-0">{% trans "An overview of active and past submissions and projects" %}</p>
</div>
<div class="wrapper wrapper--cta-box flex items-center">
<div class="flex-1">
<h3 class="heading heading--no-margin font-bold">{% trans "Submit a new application" %}</h3>
<p class="text-base m-0">{% trans "Apply now for our open rounds" %}</p>
</div>
<div>
<a class="button button--blue-white" href="{% pageurl APPLY_SITE.root_page %}" class="button">{% trans "Apply" %}</a>
</div>
{% if request.user|has_edit_perm:submission %}
<a class="button button--primary ml-4" href="{% url 'funds:submissions:edit' submission.id %}">
{% if submission.status == 'draft_proposal' %}
{% trans "Start your" %} {{ submission.stage }} {% trans "application" %}
{% else %}
{% trans "Edit" %}
{% endif %}
</a>
{% endif %}
</div>
{% empty %}
{% trans "No active submissions" %}
{% endfor %}
</div>
</div>
{% endif %}

{% if active_projects.count %}
<div class="mb-10">
<div class="flex">
<h2 class="font-light flex-1">{% trans "My active projects" %}</h2>
</div>
{% for project in active_projects.data %}
<div class="wrapper wrapper--status-bar-outer">
<div class="wrapper wrapper--status-bar-inner">
<div class="mt-5 ml-4">
<h4 class="heading mb-2 font-bold"><a class="link link--underlined" href="{% url 'apply:projects:detail' project.id %}">{{ project.title }}</a></h4>
<p class="m-0 text-gray-400">{% trans "Project start date: " %} {{ project.created_at.date }}</p>
<div class="wrapper wrapper--large wrapper--inner-space-medium">
{% if my_active_submissions %}
<div class="mb-10">
<div class="flex">
<h2 class="font-light flex-1">{% trans "My active submissions" %}</h2>
</div>
{% for submission in my_active_submissions %}
<div class="wrapper wrapper--status-bar-outer">
<div class="wrapper wrapper--status-bar-inner">
<div class="mt-5 ml-4">
<h4 class="heading mb-2 font-bold"><a class="link link--underlined" href="{% url 'funds:submissions:detail' submission.id %}">{{ submission.title }}</a></h4>
<p class="m-0 text-gray-400">{% trans "Submitted on " %} {{ submission.submit_time.date }} {% trans "by" %} {{ submission.user.get_full_name }}</p>
</div>
{% status_bar submission.workflow submission.phase request.user css_class="status-bar--small" %}
</div>
{% if request.user|has_edit_perm:submission %}
<a class="button button--primary ml-4" href="{% url 'funds:submissions:edit' submission.id %}">
{% if submission.status == 'draft_proposal' %}
{% trans "Start your" %} {{ submission.stage }} {% trans "application" %}
{% else %}
{% trans "Edit" %}
{% endif %}
</a>
{% endif %}
</div>
{% project_status_bar project.status request.user css_class="status-bar--small" %}
{% empty %}
{% trans "No active submissions" %}
{% endfor %}
</div>
{% endif %}

{% if active_projects.count %}
<div class="mb-10">
<div class="flex">
<h2 class="font-light flex-1">{% trans "My active projects" %}</h2>
</div>
{% for project in active_projects.data %}
<div class="wrapper wrapper--status-bar-outer">
<div class="wrapper wrapper--status-bar-inner">
<div class="mt-5 ml-4">
<h4 class="heading mb-2 font-bold"><a class="link link--underlined" href="{% url 'apply:projects:detail' project.id %}">{{ project.title }}</a></h4>
<p class="m-0 text-gray-400">{% trans "Project start date: " %} {{ project.created_at.date }}</p>
</div>
{% project_status_bar project.status request.user css_class="status-bar--small" %}
</div>
</div>
{% empty %}
{% trans "No active projects" %}
{% endfor %}
</div>
{% empty %}
{% trans "No active projects" %}
{% endfor %}
{% endif %}
</div>
{% endif %}
</div>

{% if historical_submissions.count %}
<div class="wrapper wrapper--large wrapper--inner-space-medium mb-8">
<h2 class="text-xl mb-2">{% trans "Submission history" %}</h3>
{% render_table historical_submissions.table %}
</div>
{% endif %}
{% if historical_submissions.count %}
<div class="wrapper wrapper--large wrapper--inner-space-medium mb-8">
<h2 class="text-xl mb-2">{% trans "Submission history" %}</h3>
{% render_table historical_submissions.table %}
</div>
{% endif %}

{% if historical_projects.count %}
<div class="wrapper wrapper--large wrapper--inner-space-medium mb-8">
<h2 class="text-xl mb-2">{% trans "Project history" %}</h2>
{% render_table historical_projects.table %}
</div>
{% endif %}
{% if historical_projects.count %}
<div class="wrapper wrapper--large wrapper--inner-space-medium mb-8">
<h2 class="text-xl mb-2">{% trans "Project history" %}</h2>
{% render_table historical_projects.table %}
</div>
{% endif %}

{% endblock %}
</main>
{% endblock %}
2 changes: 1 addition & 1 deletion hypha/apply/funds/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class ReviewerSettingAdmin(SettingModelAdmin):

class ApplyAdminGroup(ModelAdminGroup):
menu_label = "Apply"
menu_icon = "folder-open-inverse"
menu_icon = "folder-inverse"
items = (
RoundAdmin,
SealedRoundAdmin,
Expand Down
1 change: 1 addition & 0 deletions hypha/apply/funds/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class ValueBlock(ApplicationSingleIncludeFieldBlock):

class Meta:
label = _("Requested amount")
icon = "decimal"

def prepare_data(self, value, data, serialize):
return format_number_as_currency(str(data))
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/funds/templates/submissions/all.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
{% empty %}
<div class="flex flex-col items-center justify-center py-20 px-4 border-t">
<h2 class='text-2xl'>No results matched your search</h2>
<p>Try <a href="./" hx-get="./" hx-target="#main" hx-push-url="true" hx-swap="outerHTML">clearing</a> all the query and start again.</p>
<p>Try <a href="./" hx-get="./" hx-target="#main" hx-push-url="true" hx-swap="outerHTML">clearing</a> the current query and try again.</p>
</div>
{% endfor %}
</section>
Expand Down
24 changes: 12 additions & 12 deletions hypha/apply/funds/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,17 +1032,16 @@ def get_success_url(self):
)
return reverse_lazy("funds:submissions:detail", args=(submission.id,))

def delete(self, request, *args, **kwargs):
def form_valid(self, form):
reminder = self.get_object()
messenger(
MESSAGES.DELETE_REMINDER,
user=request.user,
request=request,
user=self.request.user,
request=self.request,
source=reminder.submission,
related=reminder,
)
response = super().delete(request, *args, **kwargs)
return response
return super().form_valid(form)


class AdminSubmissionDetailView(ActivityContextMixin, DelegateableView, DetailView):
Expand Down Expand Up @@ -1565,21 +1564,22 @@ class SubmissionDeleteView(DeleteView):
model = ApplicationSubmission
success_url = reverse_lazy("funds:submissions:list")

def delete(self, request, *args, **kwargs):
def form_valid(self, form):
submission = self.get_object()
messenger(
MESSAGES.DELETE_SUBMISSION,
user=request.user,
request=request,
user=self.request.user,
request=self.request,
source=submission,
)
# delete NEW_SUBMISSION event for this particular submission

# Delete NEW_SUBMISSION event for this particular submission
Event.objects.filter(
type=MESSAGES.NEW_SUBMISSION, object_id=submission.id
).delete()
# delete submission
response = super().delete(request, *args, **kwargs)
return response

# delete submission and redirect to success url
return super().form_valid(form)


@method_decorator(login_required, name="dispatch")
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class VendorFormSettingsAdmin(SettingModelAdmin):

class ProjectAdminGroup(ModelAdminGroup):
menu_label = "Projects"
menu_icon = "duplicate"
menu_icon = "folder-open-1"
items = (
ContractDocumentCategoryAdmin,
DocumentCategoryAdmin,
Expand Down
Loading

0 comments on commit a54e8c1

Please sign in to comment.