Andrew Knox Shiels
|
451e23472f
Tidied the views up a bit. Changed the consumers calls to view functions to be await database_sync_to_async (issues with delete_idea consumer and remove_tag consumer accessing the database out of order, remove_tag couldn't remove a tag from an idea that had been deleted).
|
6 years ago |
Andrew Knox Shiels
|
5237139b23
Added M2M relation between tags and ideas. Altered view functions to make use of these. remove_tag now removes the current idea from the current tag's idea_set. Delete still removes the tag in its entirety. Add still checks for a tag's existence before creating one. Add and remove tag functions return every tag, every tag's canvas_set and every tag's idea_set to make the updating of these sets on the front-end relatively straightforward. Delete only returns the tag so that the callback can just find its location in its array and remove it.
|
6 years ago |
Andrew Knox Shiels
|
78c7e87638
Edited comments component so that when the user us promoted, the admin buttons become visible (resolve 1, resolve all, delete) and on demotion, they disappear.
|
6 years ago |
Andrew Knox Shiels
|
6bf2541800
Added comment resolve functionality for a single comment as well as for all comments on an idea. Also, comment resolve, delete and resolveAll buttons are hidden for non-admin users.
|
6 years ago |
Andrew Knox Shiels
|
e4db0c8c18
Added functionality to the deleteUserSuccessCallback where if the current user is the victim user, they are kicked out of the project and back to their own project-list page without the need for a page reload.
|
6 years ago |
Andrew Knox Shiels
|
3dc6a4d911
Modified canvas model, replaced 'is_ethics' boolean with 'canvas_type' integer to allow for privacy canvas and any other canvas type (so long as the category list exists and is of length 9 with a 10th uncategorised slot) which may arise in the future.
|
6 years ago |
Andrew Knox Shiels
|
3ef158e4b6
Moved the collaborator component up to the ProjectDetail page instead of the CanvasDetail page, as user/admin permissions and public toggle option is now a project-level feature instead of an individual canvas feature.
|
6 years ago |
Andrew Knox Shiels
|
2a349e7176
Made more fixes and added more stuff to tags. They now automatically add themselves to a canvas when an idea has its text updated in such a way as to contain the label of a tag previously not in the canvas but in the project. On creation of a tag it is added to all canvasses where it occurs. On deletion of the tag it is deleted from everywhere.
|
6 years ago |
Andrew Knox Shiels
|
fe77d36e8d
New canvas create was broken, fixed that. Tags automatically add themselves to a second open canvas containing the label as a substring, while they do not do the same if they do not contain the label. When a tag is removed from one canvas, it is reflected in the other by removing the link in the tag popup. Only tested with two canvasses.
|
6 years ago |
Andrew Knox Shiels
|
dd85c2f8a2
Added (very untested) project functionality. Users, admins, owner are all moved from Canvas to Project. All canvasses in a project are visible to every user in the project. The same user / admin permissions required as before, but check user in project.users instead of canvas.users. Went ahead with tags existing for all canvasses in a given project (also quite untested). When a tag is created it (should) add itself to any other canvas in the project containing the label as a substring of an idea. Deletion deletes the tag object outright, it doesn't check occurrences in other canvasses.
|
6 years ago |
Andrew Knox Shiels
|
6bf5fed11e
'Resolve all comments' no longer deletes comments, instead it marks them as resolved. Added some basic CSS to distinguish resolved from unresolved.
|
6 years ago |
Andrew Knox Shiels
|
7ab33db9bc
Added some basic CSS to tidy the canvas up a bit, mostly for myself, as I was tired of looking at black-and-white left-aligned text fields. Additionally added a boolean to canvas model is_ethics, true for ethics canvas and false for business canvas. If business canvas, the blocks are labelled as a business canvas's would be, with the extra uncategorised block at the bottom. Newly created canvasses have (Business) or (Ethics) at the end of the default title to show their type. For now, on the anonymous user trial of a canvas, tags and collaborators are outright disabled.
|
6 years ago |
Andrew Knox Shiels
|
b2ee80a9b3
Fixed a bug where the comments weren't appearing to follow the ideas when the most recently modified idea was moved to the top of the list in its category. Deleted a redundant Vue component for comments (formerly commentListComponent).
|
6 years ago |
Andrew Knox Shiels
|
0ea5d97a3a
Added anonymous user functionality. Idea addition, modification and deletion only. Collabs, tags and comments disabled.
|
6 years ago |
Andrew Knox Shiels
|
87586e8cf6
Added (online) functionality to the collaborators component where it shows a user as (online) when they log in and removes that message on logout, exception for the current user where it still shows (you) in that space. Removed redundant url mappings and html templates, as the view functions for them were converted into ordinary functions called by their respective websocket consumers.
|
6 years ago |
Andrew Knox Shiels
|
ae409633cb
Added <user> is typing functionality for Ideas. Tested basically with only two logged-in users.
|
6 years ago |
Andrew Knox Shiels
|
353fd6d4b5
Added channel / websocket functionality to the project. Each database-modifying function is called by an asynchronous consumer. Tested only basic operation with two different logged-in users viewing the same canvas to see that it updated both when one user changed something.
|
6 years ago |
Andrew Knox Shiels
|
ff03155701
When making idea component the tag button disappeared. Put it back, moved the add/remove tag functions to the bottom of the views.py file to tidy it up a bit, and added the cardinality indicator for the comments button that I had forgotten about. Also added routing.py to the project and installed django channels in preparation for the channels portion of the project.
|
6 years ago |
Andrew Knox Shiels
|
7f2d88a9af
All things now open in a vue modal component, they no longer redirect away from the page except for clicking a different canvas link in a tag. Tags should automatically remove themselves when there are no ideas containing them in the current canvas, which will only cause them to be deleted outright if they also do not occur in any other canvas. Tags still require their own view functions in python, as they're currently mixed in with the CanvasDetailView class-based view.
|
6 years ago |
Andrew Knox Shiels
|
78ec64414c
Added tags. Addition, conditional creation (if doesn't exist), removal and conditional deletion(if there are no longer any canvasses with that tag). The tags are represented with Vue components, using a modal component when clicked to display the canvasses it occurs in as links. The modal component was taken from the Vue.js modal example at https://vuejs.org/v2/examples/modal.html .
|
6 years ago |
Andrew Shiels
|
091d20345e
Delete 'canvas2/catalog/migrations/.DS_Store'
|
6 years ago |
Andrew Shiels
|
ef506aee2b
Delete 'canvas2/catalog/static/canvas2/.DS_Store'
|
6 years ago |
Andrew Shiels
|
37501bc19f
Delete 'canvas2/catalog/.DS_Store'
|
6 years ago |
Andrew Shiels
|
c93df3e03d
Delete '.DS_Store'
|
6 years ago |
Andrew Shiels
|
1a0b5b866f
Delete 'canvas2/.DS_Store'
|
6 years ago |
Andrew Knox Shiels
|
1bf8a0c1af
Added permissions for view functions, still using login_required decorator for new_canvas for now, cannot check user in canvas.users for canvas that doesn't exist. Provisionally completed functionality for collaborators page; temporarily a separate page with views and ajax/json requests/responses for purposes of making sure they work.
|
6 years ago |
Andrew Knox Shiels
|
5877cdc74e
added .DS_Store to .gitignore
|
6 years ago |
Andrew Knox Shiels
|
f44a8c8504
Was continuing to work on view and on templates / JS files not knowing about any ongoing code reviews. Added comment add/remove/resolve functionality, and began work on collaborators functionality (currently under construction, only rendering current admins and users). Upon completion the permissions is next along with all TODOs that have been left.
|
6 years ago |
Andrew Knox Shiels
|
4768559724
Added comment add/remove functionality. Edit and Resolve are still TODO.
|
6 years ago |
Andrew Knox Shiels
|
d561c4a831
Added div elements for Idea Categories that contain idea lists, idea creation/deletion/comment buttons. Idea still needs submit to be clicked and comments with AJAX/JSON method are still a TODO. Added is_temporary to canvas model to denote if a canvas is a temporary canvas or not, temporary canvasses are made by anonymous users and should be deleted when the session is closed (also TODO).
|
6 years ago |