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

1439 distribute profile page tables into 2 categories #1440

Merged
merged 19 commits into from
Dec 5, 2023
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
distributing tables into categories using htmx #1439
  • Loading branch information
user committed Oct 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit b7833943ec38a3371c13e1a64f5ac1392a595b68
28 changes: 14 additions & 14 deletions login/templates/login/user_tables.html
Original file line number Diff line number Diff line change
@@ -4,21 +4,21 @@
{% block main-content-body %}
{% if profile_user == request.user %}
{% include "login/user_nav.html" %}
<div id="tableContainer" hx-get="/profile/{{ profile_user.id }}/tables" hx-trigger="load">
<h2>Published</h2>
<ul>
{% for table in reviewed_tables %}
<li><a href="/dataedit/view/{{ table.schema }}/{{ table.name }}">{{ table.name }} - {{ table.schema }}</a></li>
{% endfor %}
</ul>
<div id="tableContainer" hx-get="/profile/{{ profile_user.id }}/tables" hx-trigger="load">
<h2>Published</h2>
<ul>
{% for table in reviewed_tables %}
<li><a href="/dataedit/view/{{ table.schema }}/{{ table.name }}">{{ table.name }} - {{ table.schema }}</a></li>
{% endfor %}
</ul>

<h2>Draft</h2>
<ul>
{% for table in not_reviewed_tables %}
<li><a href="/dataedit/view/{{ table.schema }}/{{ table.name }}">{{ table.name }} - {{ table.schema }}</a></li>
{% endfor %}
</ul>
</div>
<h2>Draft</h2>
<ul>
{% for table in not_reviewed_tables %}
<li><a href="/dataedit/view/{{ table.schema }}/{{ table.name }}">{{ table.name }} - {{ table.schema }}</a></li>
{% endfor %}
</ul>
</div>

{% endif %}
{% endblock %}
8 changes: 4 additions & 4 deletions login/views.py
Original file line number Diff line number Diff line change
@@ -48,13 +48,13 @@ def get(self, request, user_id):
else:
not_reviewed_tables.append(table_data)

if request.is_ajax():
if request.is_ajax() :
return render(
request,
"login/user_tables.html",
"login/user_tables.html" ,
{
"reviewed_tables": reviewed_tables,
"not_reviewed_tables": not_reviewed_tables,
"reviewed_tables": reviewed_tables ,
"not_reviewed_tables": not_reviewed_tables ,
}
)