Commit Graph

16 Commits

Author SHA1 Message Date
Tim Abbott 69c4645bd2 attachments: Stop fetching attachments in / endpoint.
We only use this data in a rarely-used settings screen, and it can be
large after years of posting screenshots.

So optimize the performance of / by just loading these data when we
actually visit the page.

This saves about 300ms of runtime for loading the home view for my
user account on chat.zulip.org.
2018-05-04 16:22:26 -07:00
Aditya Bansal b9f1acb300 linter: Enforce 2 space indents on tags spread over multiple lines.
We make some specific cases of tags use 2 space indents.
The case description:
* A tag with opening tag spread over multiple lines and closing tag
on the same line as of the closing angle bracket of the opening tag.
* A tag with opening tag spread over multiple lines and closing tag
not on the same line as of the closing angle bracket of the opening
tag.

Example:
Case 1:

Not linted:
<button type="button"
class="btn btn-primary btn-small">{{t "Yes" }}</button>

After linting:
<button type="button"
  class="btn btn-primary btn-small">{{t "Yes" }}</button>

Case 2:

Before linting:
<div class = "foo"
     id = "bar"
     role = "whatever">
     {{ bla }}
</div>

After linting:
<div class = "foo"
  id = "bar"
  role = "whatever">
    {{ bla }}
</div>
2018-04-07 20:08:44 -07:00
Greg Price 55cf54c087 upload: Remove old per-user quota feature.
We'll replace this primarily with per-realm quotas (plus the simple
per-file limit of settings.MAX_FILE_UPLOAD_SIZE, 25 MiB by default).

We do want per-user quotas too, but they'll need some more management
apparatus around them so an admin has a practical way to set them
differently for different users.  And the error handling in this
existing code is rather confused.  Just clear this feature out
entirely for now; then we'll build the per-realm version more cleanly,
and then we can later add back per-realm quotas modelled after that.

The migration to actually remove the field is in a subsequent commit.

Based in part on work by Vishnu Ks (hackerkid).
2018-01-29 16:06:11 -08:00
Utkarsh Patil c9596e12be user settings: fix uploaded files UI
Fix UI and date uploaded
2017-12-18 10:12:33 -05:00
Cynthia Lin 6a4e7ad12e user settings: Enhance Uploaded files sorting.
Fixes #7149
2017-10-31 18:33:41 -07:00
Cynthia Lin 5d9327a25b user settings: Improve Uploaded Files design.
* Prevent long file names from corrupting table display.

* Add sticky table header.

Fixes #7189.
2017-10-31 18:33:41 -07:00
Brock Whittaker 99933d5cce settings: Set the upload table colum min-widths.
This sets the column width of the upload table actions and size
columns to always be 75 so that the buttons are always in the same
line and take up the least amount of space possible with that
constraint.
2017-10-04 14:29:18 -07:00
Brock Whittaker 8e2d9d64b2 settings: Enable sorting on uploads table.
This allows for sorting in the uploads table by all of the attributes
in ascending order by clicking on the headers.

Fixes #6747.
2017-09-28 16:16:16 -07:00
Brock Whittaker 7b8fd1aafb settings: Add file search to the uploads table.
This uses the searching capabilities of the list_render class to search
for files by name; normalized by lowercase locale.
2017-09-28 14:13:33 -07:00
Brock Whittaker 583d7b2834 settings: Move the upload tips input, and alerts out of list-render wrapper.
This moves the stuff that should not scroll with the table such as the
search box and tips so it is moved out to be above the
`.progressive-table-wrapper` element.
2017-09-28 14:13:33 -07:00
Vishnu Ks 17cc32f168 settings: Show error or success message when deleting uploaded files.
Fixes #6519
2017-09-27 17:50:22 -07:00
Vishnu Ks 8faa9ab214 settings: Show upload quota and total uploads size in uploaded files page.
Fixes #6408
2017-09-27 17:50:22 -07:00
Vishnu Ks 865bc06945 settings: Show attachment size and upload date in uploaded files page. 2017-09-27 17:50:22 -07:00
Brock Whittaker f1a7db2503 Add placeholders to all empty lists.
This adds placeholders that state that the lists are empty.
2017-05-11 17:49:27 -07:00
Brock Whittaker 478011c0af Remove headers from templates. 2017-05-11 17:49:26 -07:00
paxapy 9a5179c460 Add support for managing and deleting attachments.
Modified substantially by tabbott to fix tons of issues.

Fixes #454.
2017-02-16 23:44:44 -08:00