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

[#360] Show that repos is Forked if Repositories #367

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
12 changes: 9 additions & 3 deletions templates/components/tables/repositories_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@
<tr>
<th scope="row">{{ repository.num }}</th>
<td class="text-truncate" title="{{ repository.name }}">
<a href="{{ repository.get_absolute_url }}">
{{ repository.name }}
</a>
{% if repository.organization.name == 'Hexlet' %}
<a href="{{ repository.get_absolute_url }}">
{{ repository.name }}
</a>
{% elif repository.organization.name != 'Hexlet' %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

вот эта штука не должна решаться на фронте. Ведь есть репозитории, которые форкнули в Хекслете, а есть проекты-оригиналы для тех. Посмотрите, что может отдавать гитхаб. Врое бы там есть атрибут, который говорит .что репозиторий - форк.

<a href="{{ repository.get_absolute_url }}">
{{ repository.full_name }} <span class="badge bg-secondary">Fork</span>
</a>
{% endif %}
</td>
{% if not organization %}
<td>{{ repository.organization.name }}</td>
Expand Down
Loading