Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion home/templates/home/round_page_with_communities.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h3>Final Applications Closed {{ current_round.contributions_close }} at 4pm UTC

{% for participation, projects in ontime_projects %}
{% with community=participation.community funded_interns=participation.interns_funded %}
<h4 id='{{ community.slug }}'>{{ community.name }} - {{ funded_interns }} intern{{ funded_interns|pluralize }}</h4>
<h4 id='{{ community.slug }}'><a href="#{{ community.name|lower }}">{{ community.name }}</a> - {{ funded_interns }} intern{{ funded_interns|pluralize }}</h4>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tapaswenipathak! Good idea using a template filter here, but the name field may not work if the community name has more than one word. I think using the slug as in the id should work perfectly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @krysal! added. :)

<p>{{ community.description }}</p>
{% if role.is_approved_applicant or role.is_volunteer %}
{% if not current_round.contributions_close.has_passed %}
Expand Down
10 changes: 5 additions & 5 deletions home/test_initial_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def test_project_list_not_logged_in(self):

response = self.client.get(reverse('project-selection'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<h4 id="debian">Debian - 2 interns</h4>', html=True)
self.assertContains(response, '<h4 id="debian"><a href="#debian">Debian</a> - 2 interns</h4>', html=True)
self.assertContains(response, 'Project details are hidden.')
self.assertNotContains(response, '<a href="{}">Debian community landing page</a>'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True)
self.assertNotContains(response, '<a href="{}#{}">{}</a>'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True)
Expand All @@ -350,7 +350,7 @@ def test_project_list_general_time_align_rejection_before_contribution_opens(sel

response = self.client.get(reverse('project-selection'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<h4 id="debian">Debian - 2 interns</h4>', html=True)
self.assertContains(response, '<h4 id="debian"><a href="#debian">Debian</a> - 2 interns</h4>', html=True)
self.assertContains(response, 'Project details are hidden.')
self.assertNotContains(response, '<a href="{}">Debian community landing page</a>'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True)
self.assertNotContains(response, '<a href="{}#{}">{}</a>'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True)
Expand All @@ -374,7 +374,7 @@ def test_project_list_general_time_align_rejection_after_contribution_opens(self

response = self.client.get(reverse('project-selection'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<h4 id="debian">Debian - 2 interns</h4>', html=True)
self.assertContains(response, '<h4 id="debian"><a href="#debian">Debian</a> - 2 interns</h4>', html=True)
self.assertContains(response, 'Project details are hidden.')
self.assertNotContains(response, '<a href="{}">Debian community landing page</a>'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True)
self.assertNotContains(response, '<a href="{}#{}">{}</a>'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True)
Expand All @@ -394,7 +394,7 @@ def test_project_list_approved_before_contributions_open(self):

response = self.client.get(reverse('project-selection'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<h4 id="debian">Debian - 2 interns</h4>', html=True)
self.assertContains(response, '<h4 id="debian"><a href="#debian">Debian</a> - 2 interns</h4>', html=True)
self.assertContains(response, 'Project details are hidden.')
self.assertNotContains(response, '<a href="{}">Debian community landing page</a>'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True)
self.assertNotContains(response, '<a href="{}#{}">{}</a>'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True)
Expand All @@ -413,7 +413,7 @@ def test_project_list_approved_after_contributions_open(self):

response = self.client.get(reverse('project-selection'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<h4 id="debian">Debian - 2 interns</h4>', html=True)
self.assertContains(response, '<h4 id="debian"><a href="#debian">Debian</a> - 2 interns</h4>', html=True)
self.assertNotContains(response, 'Project details are hidden.')
self.assertContains(response, '<a href="{}">Debian community landing page</a>'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True)
self.assertContains(response, '<a href="{}#{}">{}</a>'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True)
Expand Down