-
Notifications
You must be signed in to change notification settings - Fork 426
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
Updated bootstrap template #381
Conversation
@ralgozino thanks for the pull, I'll add some line comments. Also:
|
@@ -1,11 +1,12 @@ | |||
{% load querystring from django_tables2 %} | |||
{% load i18n %} | |||
{% load l10n %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback @jieter
|
Thanks for adding the changes. CI still fails... |
|
||
<div class="table-container"> | ||
{% block table %} | ||
<table class="table table-bordered table-striped"{% if table.attrs %} {{ table.attrs.as_html }}{% endif %}> | ||
<table {% if table.attrs %} {{ table.attrs.as_html }}{%else%}class="table"{% endif %}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add spaces after and before %.
@@ -55,26 +53,36 @@ | |||
{% endblock table %} | |||
|
|||
{% if table.page and table.paginator.num_pages > 1 %} | |||
{% with table.page.paginator.count as total %} | |||
{% with table.page.object_list|length as count %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't these covered by the blocktrans
? on line 71?
|
||
<div class="ui container table-container"> | ||
{% block table %} | ||
<table {% if table.attrs %} {{ table.attrs.as_html }}{%else%}class="ui celled table"{% endif %}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another space issue.
def semantic(request): | ||
'''Demonstrate the use of the semantic template''' | ||
# create some fake data to make sure we need to paginate | ||
if Person.objects.all().count() < 50: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block occurs twice now, can you DRY it up?
<h3>django_tables2 with semantic template example</h3> | ||
<div class="ui container"> | ||
|
||
<!-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out? Shouldn't you include the stylesheet you added?
.table-container th.desc:after { | ||
content: '\0000a0\0025bc'; | ||
float: right; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly the same as the bootstrap CSS, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the CSS following the bootstrap one to see if it was needed. I've dropped it since is not the case.
I'm pushing some corrections, but unfortunately I can't make tox work due to a bug with virtualbox and symlinks in shared folders. I'm trying to fix it in order to fix the test that are fialing. Sorry about that. |
@jieter I hope to have addressed all of your comments. Let me know what you think. Cheers! |
Finally time to look at this again. Thanks, merged. |
Updated bootstrap template emulating the default layout as in "pale_blue" with current upstream master rebase.