Skip to content

Commit

Permalink
Add application and project tabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Nov 5, 2024
1 parent e165d47 commit f8ea6ad
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h1 class="mt-2 mb-0 font-medium">
<div class="tabs js-tabs">
<div class="tabs__container">
<a class="tab__item" href="#submission-details" data-tab="tab-1">
{% trans "Submission details" %}
{% trans "Application" %}
</a>

<a class="tab__item"
Expand All @@ -65,12 +65,13 @@ <h1 class="mt-2 mb-0 font-medium">
{% trans "Conversations" %} ({{ comments_count }})
</a>

<a class="tab__item"
href="#activity-feed"
data-tab="tab-3"
>
{% trans "Activity feed" %}
</a>
{% if object.project and PROJECTS_ENABLED %}
<a class="tab__item js-tabs-off"
href="{% url 'apply:projects:detail' pk=object.project.id %}"
>
{% trans "Project" %}
</a>
{% endif %}
{# is_staff is only used for Django Admin. #}
{% if request.user.is_staff %}
<a class="tab__item tab__item--right js-tabs-off" href="{% url 'admin:activity_event_changelist' %}?submission__id={{ object.id }}">
Expand Down Expand Up @@ -164,10 +165,6 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
{% include "funds/includes/generic_primary_actions.html" %}
{% endblock %}

{% if object.project and PROJECTS_ENABLED %}
{% include 'funds/includes/project_block.html' %}
{% endif %}

{% block screening_status %}
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ <h5>{% trans "Actions to take" %}</h5>
hx-target="#htmx-modal"
>{% trans "Create Reminder" %}</button>

<a class="button button--white button--full-width button--bottom-space"
href="{% url "apply:submissions:download" pk=object.pk %}"
>
{% trans "Download PDF" %}
</a>

{% if can_archive %}
<button class="button button--white button--full-width button--bottom-space" hx-get="{% url 'funds:submissions:archive' pk=object.pk %}" hx-target="#htmx-modal">
{% heroicon_outline "lock-closed" aria_hidden="true" size=15 stroke_width=2 class="inline align-baseline me-1" %}
Expand Down
7 changes: 0 additions & 7 deletions hypha/apply/funds/templates/funds/includes/project_block.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,6 @@ <h2 class="text-lg font-semibold m-0">
<ul class="docs-block__inner" id="project-documents-elements" {% if collapsible_header %} x-show="!collapsed" role="region"
aria-labelledby="project-documents-section" {% endif %}>

<li class="docs-block__row">
<div class="docs-block__row-inner">
{% heroicon_outline "check-circle" class="stroke-light-blue me-1" aria_hidden=true %}
<p class="docs-block__title">{% trans "Proposal" %}</p>
</div>
<div class="docs-block__row-inner">
<a class="docs-block__icon-link hover:opacity-70 transition-opacity"
href="{% if user.is_applicant %}{{ project.submission.get_absolute_url }}{% else %}{% url 'apply:submissions:simplified' pk=project.submission.pk %}{% endif %}"
>
{% heroicon_micro "eye" class="inline me-1 w-4 h-4" aria_hidden=true %}
{% trans "View" %}
</a>
</div>
</li>

<li class="docs-block__row">
<div class="docs-block__row-inner">
{% if object.user_has_updated_details %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h6 class="status-bar__subheading">
<div class="tabs js-tabs">
<div class="tabs__container">
<a class="tab__item" href="#details" data-tab="tab-1">
{% trans "Details" %}
{% trans "Project" %}
</a>

<a class="tab__item"
Expand All @@ -98,11 +98,10 @@ <h6 class="status-bar__subheading">
</a>

<a
class="tab__item"
href="#activity-feed"
data-tab="tab-3"
class="tab__item js-tabs-off"
href="{{ project.submission.get_absolute_url }}"
>
{% trans "Activity Feed" %}
{% trans "Application" %}
</a>
</div>
</div>
Expand Down
14 changes: 0 additions & 14 deletions hypha/apply/utils/pdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,20 +451,6 @@ def draw_submission_content(content):
return paragraphs


def draw_project_content(content):
prepare_fonts()
paragraphs = []
for section in BeautifulSoup(content, "html5lib").find_all(
class_="simplified__wrapper"
):
flowables = handle_block(
section, custom_style={"Heading3": "Question", "Heading5": "QuestionSmall"}
)
paragraphs.extend(flowables)

return paragraphs


def html_to_pdf(html_body: str) -> BytesIO:
"""Convert HTML to PDF.
Expand Down

0 comments on commit f8ea6ad

Please sign in to comment.