Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add My Tasks view & dashboard widget #1285
base: develop
Are you sure you want to change the base?
Add My Tasks view & dashboard widget #1285
Changes from all commits
88a624a
644dca9
7e607bc
c7b8922
a43a4a2
e9afc01
48f32a8
128bf3d
428d648
9e705ec
bc81e2c
a337a33
d358240
4062aea
4d7a59f
6116d33
f213f74
85d98e6
1a584c3
da05974
6379502
ef411b3
8534790
e6b8aab
0a6a432
8ab41fd
5258657
e1581c6
636b1d2
5e079c2
2ad638e
0e45cda
03e481e
afb08e6
7b26c07
f6b98a8
38cc0eb
720578d
4216070
003acd7
d4b8c10
5d00861
d696d84
cf5bb6c
8876d60
5a948cd
75d251a
80a8d1b
023d203
212fb07
488547a
9496a9d
54533ca
e49d147
610d87b
1857d78
af0c23f
c047e18
ce7841d
314d4cf
0686b46
dd1a74c
80b50a7
3289473
2f606d1
8d8d36f
ba6643d
7d14d91
2a75a5b
a31aea6
fee1bfc
d4c5137
790039a
8336f8b
a507cf3
18e2d53
6425e54
f60c9b4
42cd66a
81ee43b
ef97e54
f6e34b2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Instead of including it and opting out of several methods, what if we don't include
ProjectScoped
and call only the methods we need when we need them?ex. Can we instead look up the project here using
params[:project_id]
if it's present?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 tried that but we also need access to current_project in the views and ProjectScoped also sets
@nodes
for us (used by the main sidebar).This is also the approach we take in https://github.com/dradis/dradis-ce/blob/develop/app/controllers/notifications_controller.rb
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.
If we're passing
project_id
we should use it here otherwise it could have unexpected resultsThere 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.
The idea is to extend this to include other assignable record types in the future correct?
In order to leave this open for extension as easily as possible, we should check for record type before rendering the link_to and the
<li>
content since it will vary between record typesThere 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.
We can add a switch statement or a new helper method for this once we introduce another record type as a task
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.
Ditto to the 2-controller comment above
#suggestion
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.
Because this is still a basically identical view shared between layouts, I went with the notifications_controller approach which also shares a view between layouts. Happy to change this if you feel strongly about it.