Commit graph

3684 commits

Author SHA1 Message Date
Mouse Reeve
7d03bfd2f6
Merge pull request #1477 from bookwyrm-social/add-edit-book
Updates for adding and editing books
2021-10-01 10:36:09 -07:00
Mouse Reeve
74d2cf646a Moves meta tags out of p tags
I guess that's not kosher
2021-10-01 10:25:23 -07:00
Mouse Reeve
428d87a351 Don't render empty html about books 2021-10-01 10:08:56 -07:00
Mouse Reeve
0928fd03a6 Update mocks in editions tests 2021-10-01 10:08:31 -07:00
Mouse Reeve
58fa3d9ad6 Fixes dl syntax 2021-10-01 09:24:26 -07:00
Mouse Reeve
a7614d8c35 Moves editions page tests into separate file 2021-10-01 09:24:10 -07:00
Mouse Reeve
34948d494c Python formatting 2021-09-30 22:23:29 -07:00
Mouse Reeve
6902ffc4c3 Adds missing view file 2021-09-30 22:22:32 -07:00
Mouse Reeve
bdb1d1998a Helper function for html validation 2021-09-30 22:22:20 -07:00
Mouse Reeve
9c78a9d95c test fixes 2021-09-30 22:02:07 -07:00
Mouse Reeve
6178925053 Unique form identifier for delete status button 2021-09-30 22:01:55 -07:00
Mouse Reeve
ccc52287c5 More error filtering 2021-09-30 20:01:57 -07:00
Mouse Reeve
3f44389c6b Adds new test file for search 2021-09-30 13:03:36 -07:00
Mouse Reeve
92f9319fe1 Updates tests that reference self_connector 2021-09-30 11:46:17 -07:00
Mouse Reeve
1033d3d045 Updates connector tests 2021-09-30 11:33:04 -07:00
Mouse Reeve
232e4bed79 Updates migrations 2021-09-30 11:06:12 -07:00
Mouse Reeve
38f82fe660 Remove/re-add connector in migration 2021-09-30 10:55:18 -07:00
Mouse Reeve
e6e44decf9 Updates migration 2021-09-30 10:47:53 -07:00
Mouse Reeve
5dd2aac600 Merge branch 'main' into search-refactor 2021-09-30 10:41:30 -07:00
Mouse Reeve
75e69eb269 Post-processes statuses composed in modals 2021-09-30 10:00:05 -07:00
Mouse Reeve
9a96df1712 Unique id for privacy fields 2021-09-29 15:58:37 -07:00
Mouse Reeve
305dcc504b Unique names for fallback forms 2021-09-29 15:52:08 -07:00
Mouse Reeve
0dc6a18201 Skip unescaped chars warning in html validator
jankily
2021-09-29 15:47:30 -07:00
Mouse Reeve
5cdfd29f9e Unqiue id for progress fields 2021-09-29 15:46:54 -07:00
Mouse Reeve
6d17b83c8c Id uniqueness fixes 2021-09-29 15:35:08 -07:00
Mouse Reeve
69195e6cd0 Fixes form close placement on reading modals 2021-09-29 15:02:50 -07:00
Mouse Reeve
a8ed957e20 Fixes uuid reference in toggle button snippet 2021-09-29 15:01:56 -07:00
Mouse Reeve
47b08e7591 Moves tests into dirs and updates render checks 2021-09-29 14:21:57 -07:00
Mouse Reeve
33b3b518e8 Move views into subdirectory 2021-09-29 13:42:27 -07:00
Mouse Reeve
899e6b55a8 Updates references to book templates 2021-09-29 13:27:07 -07:00
Mouse Reeve
1e5a8dc3db Create subdirectories for book view templates 2021-09-29 13:21:11 -07:00
Mouse Reeve
f0e31f730a Moves form into snippet and adds boxes around sections 2021-09-29 13:18:27 -07:00
Mouse Reeve
2d13fd0a1c Merge branch 'main' into add-edit-book 2021-09-29 12:53:46 -07:00
Mouse Reeve
d36ef2bcf1 Pylint change 2021-09-29 12:42:28 -07:00
Mouse Reeve
32391dd64d Python formatting 2021-09-29 12:38:31 -07:00
Mouse Reeve
0aef011258 Don't use the format detail if it maps directly 2021-09-29 12:29:17 -07:00
Mouse Reeve
123b23728f Infer format in openlibrary import 2021-09-29 12:21:19 -07:00
Mouse Reeve
47706b5353 Use detail field on book paeg and meta 2021-09-29 11:59:09 -07:00
Mouse Reeve
54a8815f49 Updates migrations 2021-09-29 11:49:57 -07:00
Mouse Reeve
4747bb2156 Hide cover preview column if cover is unset 2021-09-29 11:36:35 -07:00
Mouse Reeve
2f93e6d723 Merge branch 'main' into book-format-choices 2021-09-29 11:33:06 -07:00
Mouse Reeve
e308ca2511
Merge pull request #1476 from bookwyrm-social/progress-modal
Progress modal
2021-09-29 11:23:29 -07:00
Mouse Reeve
cd54770aad Tick javascript cache buster 2021-09-29 11:12:26 -07:00
Mouse Reeve
52c6a90498 Don't redirect on http request to readthrough 2021-09-29 11:02:04 -07:00
Mouse Reeve
d78c278665 Progress update flow for modal 2021-09-29 10:59:36 -07:00
Mouse Reeve
cd2dcbc758
Merge pull request #1471 from bookwyrm-social/goal-cleanup
Improves html consistency for goal page
2021-09-29 10:25:34 -07:00
Mouse Reeve
4dbb09be87 Merge branch 'main' into progress-modal 2021-09-29 09:53:02 -07:00
Mouse Reeve
a1eaae1d5e Fixes markup syntax errors 2021-09-29 09:48:17 -07:00
Mouse Reeve
6e05fb6dd0 Use inline form component for goal form on goal page 2021-09-29 09:39:23 -07:00
Mouse Reeve
5f3df11e56 Moves goal card to feed dir 2021-09-29 09:24:51 -07:00
Mouse Reeve
46168a292b Moves info text to goal form snippet 2021-09-29 09:23:52 -07:00
Mouse Reeve
002a9c4267
Merge pull request #1456 from Tak/add-cover-from-url-while-adding-book
Add cover from url while adding book
2021-09-29 08:56:05 -07:00
Mouse Reeve
701bf4828b Improves html consistency for goal page 2021-09-28 18:34:12 -07:00
Mouse Reeve
6dbd402345
Merge pull request #1469 from bookwyrm-social/user-shelf
Reorganize user/shelf/goal views code
2021-09-28 17:51:58 -07:00
Mouse Reeve
a1aa34a4a4 Limits additional user for test 2021-09-28 17:40:55 -07:00
Mouse Reeve
4dc504c058 Fixes id clashes in shelf forms 2021-09-28 17:36:50 -07:00
Mouse Reeve
746d4bdba4 Validate html in user view tests 2021-09-28 17:31:13 -07:00
Mouse Reeve
b5d49d3499 Updates follows null state text 2021-09-28 17:30:58 -07:00
Mouse Reeve
6ae8215f41 Adds comment 2021-09-28 17:21:35 -07:00
Mouse Reeve
242ffe5456 Show shelf description 2021-09-28 17:20:15 -07:00
Mouse Reeve
5ea40e23b7 Moves shelf delete button 2021-09-28 17:17:01 -07:00
Mouse Reeve
6d9bf349d1 Fixes delete shelf logic and adds tests 2021-09-28 17:02:18 -07:00
Mouse Reeve
24553e0e35 Updates edit/create shelf forms 2021-09-28 16:37:24 -07:00
Mouse Reeve
dba0aaff2c Adds description field to shelf 2021-09-28 16:36:47 -07:00
Mouse Reeve
183e76eb2a Adds test for shelf 2021-09-28 16:18:32 -07:00
Mouse Reeve
cc1ae270cc Label shelf privacy in edit shelf form 2021-09-28 16:12:34 -07:00
Mouse Reeve
d9945ac5e3 Updates references to templates 2021-09-28 16:04:08 -07:00
Mouse Reeve
9a4b71d585 Shuffles around user profile, shelf, and goal templates 2021-09-28 16:00:45 -07:00
Mouse Reeve
4402fc6c14 HTML validation in tests 2021-09-28 15:55:35 -07:00
Mouse Reeve
21fee19b42 Use recently active as the default sort order 2021-09-28 15:51:49 -07:00
Mouse Reeve
5b3ff8469d Html validation fix for user admin view 2021-09-28 15:20:10 -07:00
Mouse Reeve
ada3e1d4d6 Adds options to html validator and fixes dl/dts 2021-09-28 15:02:24 -07:00
Mouse Reeve
2befef7deb Brings federation page html in line with html validator 2021-09-28 14:39:23 -07:00
Mouse Reeve
65d7f50811 Updates federation tests 2021-09-28 14:15:06 -07:00
Mouse Reeve
29ef6df714 Fixes dashboard page for html validator complaints 2021-09-28 13:54:41 -07:00
Mouse Reeve
afcd296513 Test rendered html 2021-09-28 13:44:49 -07:00
Mouse Reeve
0fa0c1e2d9 Adds IP blocklist render test 2021-09-28 13:36:41 -07:00
Mouse Reeve
4a5efab2f8 Consistent syntax for back to list 2021-09-28 13:34:14 -07:00
Mouse Reeve
538ae015cd Fixes report template paths 2021-09-28 13:32:23 -07:00
Mouse Reeve
27e6cff0f3 Change field display order on edit instance page 2021-09-28 13:27:03 -07:00
Mouse Reeve
8e3f6657fc Fixes edit instance template name 2021-09-28 13:24:25 -07:00
Mouse Reeve
fa0e3cc112 Creates admin views test directory 2021-09-28 13:21:51 -07:00
Mouse Reeve
67a4b2713a Use in-table style for null states 2021-09-28 13:18:27 -07:00
Mouse Reeve
c5746bbce0 Adds federation null state 2021-09-28 13:11:22 -07:00
Mouse Reeve
5b97135155 Fixes reference to filters template 2021-09-28 13:07:57 -07:00
Mouse Reeve
de5daf8057 Adds email blocklist null state 2021-09-28 13:05:45 -07:00
Mouse Reeve
57044d1c20 Adds null state for ip blocklist 2021-09-28 13:04:36 -07:00
Mouse Reeve
b3fdd1ad51 Puts sections into boxes on site page 2021-09-28 13:02:09 -07:00
Mouse Reeve
6c73c94fce Move site settings sub-tabs to the site.html template 2021-09-28 12:53:17 -07:00
Mouse Reeve
9b091eaf75 Moves user admin templates into settings directory 2021-09-28 12:46:38 -07:00
Mouse Reeve
a1a1fd90a1 Moves reports into settings directory 2021-09-28 12:43:21 -07:00
Mouse Reeve
9c9adfc6f0 Updates references to templates 2021-09-28 12:39:52 -07:00
Mouse Reeve
1c262a1a64 Updates internal references 2021-09-28 12:26:55 -07:00
Mouse Reeve
7b985f3a41 Sorts admin templates into even more directories 2021-09-28 12:22:41 -07:00
Mouse Reeve
057f870997 Avatar display on mobile 2021-09-28 12:09:13 -07:00
Mouse Reeve
6266b58650 Updates static paths in tests 2021-09-28 12:02:09 -07:00
Mouse Reeve
c5d7c7dbff Updates block view path reference in test 2021-09-28 11:49:53 -07:00
Mouse Reeve
a9eb544bac Moves blocks views and tests into preferences dir 2021-09-28 11:44:53 -07:00
Mouse Reeve
461f834973 Move preferences test into their own directory 2021-09-28 11:41:40 -07:00
Mouse Reeve
4511bb2ccd Italics for null state text 2021-09-28 11:29:42 -07:00
Mouse Reeve
85f6b615bd Python formatting 2021-09-28 11:27:16 -07:00
Mouse Reeve
1b0a5232bc Move preferences views into directory 2021-09-28 11:23:47 -07:00
Mouse Reeve
e971638f14 Render test for change password view 2021-09-28 11:09:24 -07:00
Mouse Reeve
f281d9014a Creates sections in edit profile view 2021-09-28 11:00:16 -07:00
Mouse Reeve
585c71e72a Adds html linting to test 2021-09-28 10:59:51 -07:00
Mouse Reeve
9a06b7d493 Fixes incorrect label in edit user panel 2021-09-28 09:24:09 -07:00
Mouse Reeve
72cbc1cb1b Adds label 2021-09-28 09:23:50 -07:00
Mouse Reeve
273198d634 Merge branch 'main' into progress-modal 2021-09-28 08:00:45 -07:00
Hugh Rundle
66494e7788 fix reverse reference to user bookwyrm_groups 2021-09-28 18:53:11 +10:00
Levi Bard
9db75cc5b7 Add test for creating a book with a cover url 2021-09-28 10:01:31 +02:00
Mouse Reeve
0a37556941
Merge pull request #1401 from bookwyrm-social/opensearch
Adds opensearch xml file
2021-09-27 19:48:53 -07:00
Mouse Reeve
95cdaae4d4 Python formatting 2021-09-27 19:38:54 -07:00
Mouse Reeve
c32f975a67 Working in firefox 2021-09-27 19:28:50 -07:00
Mouse Reeve
99ef81be9b Linter fixes 2021-09-27 19:05:13 -07:00
Mouse Reeve
15fc31bf77 Merge branch 'main' into opensearch 2021-09-27 18:58:28 -07:00
Mouse Reeve
767d378170 Update status tests 2021-09-27 18:52:45 -07:00
Mouse Reeve
e0aa8a7fdf Fixes shelf view boolean logic 2021-09-27 17:58:21 -07:00
Mouse Reeve
f13f3d460c Fixing checking list perms 2021-09-27 17:52:27 -07:00
Mouse Reeve
99c1a670f4 Fixes checking goal perms 2021-09-27 17:52:20 -07:00
Mouse Reeve
56bf8d923f Updates goal and list tests 2021-09-27 17:52:10 -07:00
Mouse Reeve
6c0b1da83b Fixes feed tests 2021-09-27 17:32:54 -07:00
Mouse Reeve
c874a762dd Updates inbox view 2021-09-27 17:27:17 -07:00
Mouse Reeve
62ff9d6199 Python formatting 2021-09-27 16:08:52 -07:00
Mouse Reeve
af2f78095e Fixes assert syntax 2021-09-27 16:06:01 -07:00
Mouse Reeve
dfa8bafe18 Uses new visible/editable/deleteable functions 2021-09-27 16:04:40 -07:00
Mouse Reeve
e6ae500569 Fixes syntax problem on http raises 2021-09-27 16:00:50 -07:00
Mouse Reeve
84443c7f81 Custom perms function for shelf view 2021-09-27 15:55:55 -07:00
Mouse Reeve
3f10ae248a Changes visiblity function to raise 2021-09-27 15:54:58 -07:00
Mouse Reeve
3657f9e0df Check perms in status views 2021-09-27 14:03:17 -07:00
Mouse Reeve
556ae0726b Check perms in list views 2021-09-27 14:03:06 -07:00
Mouse Reeve
ab31798931 Adds model function to check perms 2021-09-27 14:02:34 -07:00
Mouse Reeve
0f57a43bfb Separate access controls for delete and re-order 2021-09-27 13:31:35 -07:00
Mouse Reeve
10098a402d Don't show list item controls to contributing viewers 2021-09-27 13:25:53 -07:00
Mouse Reeve
ab5521480d
Merge pull request #1462 from bookwyrm-social/fewer-active-shelf-queries
Fewer active shelf queries
2021-09-27 13:16:50 -07:00
Mouse Reeve
1efe62a70e Check for readthrough annotation 2021-09-27 13:08:11 -07:00
Mouse Reeve
d7a54b0b10 Removes stray print 2021-09-27 12:56:40 -07:00
Mouse Reeve
6d2403bbc7
Merge pull request #1459 from bookwyrm-social/password-reset
Prevent password reset for inactive users
2021-09-27 12:55:05 -07:00
Mouse Reeve
8b0a8e2611 Another user mock on request 2021-09-27 12:38:49 -07:00
Mouse Reeve
dd3850a3ba Updates books test 2021-09-27 12:26:56 -07:00
Mouse Reeve
36c00c49ab User viewer aware objects for feed suggested books 2021-09-27 11:37:50 -07:00
Mouse Reeve
ba4df5b38b Safely return if there are no current shelves 2021-09-27 11:29:53 -07:00
Mouse Reeve
8e8f46ee51 Only call .all once in shelf view 2021-09-27 11:27:46 -07:00
Mouse Reeve
cb089ed817 One query to get book for book view 2021-09-27 11:23:55 -07:00
Mouse Reeve
35131262ff CHeck for current shelves attr before querying for it 2021-09-27 11:17:53 -07:00
Mouse Reeve
995e2c47db User viewer aware objects for book page
Plus other refactors for that view
2021-09-27 11:17:42 -07:00
Mouse Reeve
6d06edc2c7 User viewer aware books for all books shelf view 2021-09-27 10:58:34 -07:00
Mouse Reeve
eb34bb2d93
Merge pull request #1461 from bookwyrm-social/views-init
Adds init file to admin views dir
2021-09-27 10:37:23 -07:00
Mouse Reeve
e75a49f799
Merge pull request #1455 from bookwyrm-social/refactor-readthroughs
Refactor read-throughs
2021-09-27 10:29:46 -07:00
Mouse Reeve
bc87856c2e Merge branch 'main' into book-format-choices 2021-09-27 10:29:12 -07:00
Mouse Reeve
1cb1b29f57 Adds request user to mock 2021-09-27 10:26:25 -07:00
Mouse Reeve
69b010a8d3 f string updates 2021-09-27 10:21:46 -07:00
Mouse Reeve
28d40e9914 Use url names in redirects 2021-09-27 10:17:16 -07:00
Mouse Reeve
92de48afd4 Adds init file to admin views dir
Is this why they're not pylinting?
2021-09-27 10:06:46 -07:00
Mouse Reeve
c399d6edfb Prevent password reset for inactive users 2021-09-27 09:31:51 -07:00
Hugh Rundle
fb823189a0 don't allow non-local users to join groups (yet)
Groups are not compatible with ActivityPub because I don't know what I'm doing.

NOTE: this is super hacky, fix ASAP
2021-09-27 21:48:40 +10:00
Hugh Rundle
e15eef16c5 improve new group member adding
The add-members page now looks almost identical to the group
page and is clearer.
2021-09-27 21:21:00 +10:00
Levi Bard
0e6895633c Allow adding a cover by url when adding a new book (#1443) 2021-09-27 13:00:16 +02:00
Hugh Rundle
1a02af1450 allow members to see groups and their lists
- add additional logic to visible_to_user, for groups and their objects
- cleans up some queries in Group view

NOTE: I can't work out how to make group lists only visible
to users who should be able to see them, on user group listings.
They still can't access the actual group, but can see it on
user pages. This is potentialy problematic.
2021-09-27 20:24:25 +10:00
Hugh Rundle
df5a5f94a1 fix local_path for groups 2021-09-27 19:27:39 +10:00
Hugh Rundle
c87712c995 allow group members to add items to group lists directly
NOTE: this will be the case regardless of privacy settings of the list
2021-09-27 18:41:29 +10:00
Hugh Rundle
81e5ff5b76 show groups on member pages if allowed
- display groups on user pages when not the logged in user
- restrict visibility of groups on user pages and group pages themselves according to privacy settings
2021-09-27 17:51:18 +10:00
Hugh Rundle
277c033fda show star if this user is the creator/manager of the group 2021-09-27 17:50:38 +10:00
Hugh Rundle
e5ca377cd3 clean up stray code mess 2021-09-27 16:50:51 +10:00
Hugh Rundle
e38d7b63f3 make groups actually editable 2021-09-27 16:49:56 +10:00
Hugh Rundle
493ed14f34 better group creation form logic and placement 2021-09-27 16:39:12 +10:00
Hugh Rundle
0ccd54b05a better urls and views for group creation and editing 2021-09-27 15:38:05 +10:00
Hugh Rundle
f3181690a2 change group owner from 'manager' to 'user'
This will allow privacy management to use existing code.
Some template updates also are for rationalising how
groups are created and edited.
2021-09-27 15:36:41 +10:00
Hugh Rundle
2874e52309 rationalise group creation and prep for group privacy 2021-09-27 15:34:14 +10:00
Hugh Rundle
762202c4b0 fix UI for group curated list editing
When creating or editing a list, the group selection dropdown will only appear if the user selects "group" as the curation option (or it is already selected).

- fix typo in bookwyrm.js comments
- add data-hides trigger for hiding elements after they have been unhidden, where simple toggles are not the right approach
2021-09-27 11:03:41 +10:00
Hugh Rundle
0e2095bc5e refer to group in group lists created_text 2021-09-26 20:52:44 +10:00
Hugh Rundle
5fccb991a7 remove list from group when changing curation
Allows 'group' to be blank when saving a list.
Removes the 'group' field when saving a list with curation other than 'group' - this stops the list "sticking" to a group after it is changed from group curation to something else.
2021-09-26 18:28:16 +10:00
Hugh Rundle
8bfc71db6e create group curated lists 2021-09-26 15:56:52 +10:00
Hugh Rundle
f3a3ba5f01 pass group value to list views and vice-versa 2021-09-26 15:56:02 +10:00
Hugh Rundle
b921d666cf add group field to ListForm 2021-09-26 15:55:16 +10:00
Hugh Rundle
686198472d update group and list models
- remove GroupList model
- add a group foreign key value  to List model
- remove reference to lists in Group model
2021-09-26 15:50:15 +10:00
Hugh Rundle
ec0720514e don't allow non-manager to add and remove group members 2021-09-25 20:25:30 +10:00
Hugh Rundle
035fc5209d better logic for identifying group manager 2021-09-25 20:23:59 +10:00
Hugh Rundle
62a5ed7a9e identify group manager 2021-09-25 19:53:06 +10:00
Hugh Rundle
b645d75303 add and remove users from groups 2021-09-25 17:34:44 +10:00
Hugh Rundle
e800106be4 smaller cards for group members
- this will also enable members to be removed easily by managers in a future commit.
2021-09-25 11:37:08 +10:00
Hugh Rundle
8d17f888ea improve naming of templates and urls for groups 2021-09-25 11:36:35 +10:00
Hugh Rundle
7c0deabcb2 update urls and group view for searching users to add to group 2021-09-25 11:14:04 +10:00
Hugh Rundle
cbe172df3d find users for groups
- search for users to add to a group
- display suggested users on search results screen

TODO: actaully enable users to be added!
TODO: groups/suggested_users probably could be replaced with some logic in snippets/suggested_users.html
2021-09-25 11:11:58 +10:00
Hugh Rundle
8c326ec52f user groups listing template
- creates groups/user_groups template for listing a user's groups on their user page
2021-09-25 11:10:06 +10:00
Hugh Rundle
273ad9a466 add create_group to __init__.py
you probably want this otherwise nothing previously added for group creation will work :-)
2021-09-25 10:55:32 +10:00
Hugh Rundle
d4fcf88cf5 add list cards to groups page
- add list cards to groups page based on lists page
- add sort to members on group page
2021-09-24 21:57:01 +10:00
Hugh Rundle
86a60d58e5 add user cards to group pages 2021-09-24 21:24:06 +10:00
Hugh Rundle
264d9b2f3c add group page template 2021-09-24 20:35:51 +10:00
Hugh Rundle
9b6d2a9d88 add group page 2021-09-24 20:34:11 +10:00
Hugh Rundle
f32a2cc4d0 group creation form can now be submitted!
Whoops
2021-09-24 15:04:52 +10:00
Hugh Rundle
4e93b09067 create group form
adds a group creation form to user dashboard
2021-09-24 14:12:36 +10:00
Hugh Rundle
e07a25e288 add groups urls 2021-09-24 07:52:40 +10:00
Hugh Rundle
99b533510a add group templates 2021-09-24 07:51:51 +10:00
Hugh Rundle
71b1c6117c update templates for groups 2021-09-24 07:50:57 +10:00
Hugh Rundle
b74cd37096 add models for groups 2021-09-24 07:49:54 +10:00
Hugh Rundle
3e3c90ec03 add views for groups 2021-09-24 07:49:25 +10:00
Mouse Reeve
c465c70c22 Handles statuses with no readthrough updates 2021-09-22 17:06:06 -07:00
Mouse Reeve
d510d72b8d Fixes syntax in reading view 2021-09-22 16:41:43 -07:00
Mouse Reeve
a96d027cf3 Easier to read first-item-or-none list logic 2021-09-22 16:16:53 -07:00
Mouse Reeve
c54609d7fd Refactors how readthroughs get updated 2021-09-22 16:08:25 -07:00