Closed Kaik closed 8 years ago
I have changed forum tree look a bit because edit user ranks dropdown was hidden by navbar menu below. Plus instead of a table, I used list group.
There are issues in 4.0.0. I'm not fixing them now (well apart the one with menu) because at the moment it is just refactoring. I have written them down on paper when I will finish with refactoring AdminController I will post them here(issues section) and after I finish with all the refactoring I will start fixing them.
There are issues in 4.0.0
as I said, it was never finished.
I know. I'm just relating to previous unfinished code as 4.0.0. The reason, why I wrote the previous post, is because anyone who might test it or check it may encounter some of those issues and point them out. I'm testing refactored functions and compare them to version 4.0.0 to check if it is my mistake or not.
Note to self assignranksAction will not use form class only plain html form.
@craigh I have a problem with Add/Modify forum form, moderatorUsers filed. Basically, I have used entity filed for that but it looks like this might be more complicated than I thought. Do you have any suggestions?
I can't see your code, how would I know?
Do you have any suggestions?
I think you need to use ForumUserEntity maybe? and not UserEntity
Current test code is here https://github.com/Kaik/Dizkus/blob/0b52ecd4bea5757305d95ae7301b19458e1bcb99/Form/Type/ForumType.php#L69
But the problem is that there should be select with all the users from users table while selected ones are ModeratorUserEntity which uses ForumUserEntity which is connected to UserEntity I have no idea how to solve it.
I think you need to use ForumUserEntity maybe? and not UserEntity
not all users.
Unless we can base only on ForumUserEntity but core user is "copied" to forum user only when he post something.
right
I have tried to stick to 4.0.0 behaviour select there is populating all users even guest.
I'm sorry, I have no idea. you'll have to work it out.
:) Ok then I will come out with something.
I have moved part of deleteforum functionality and I will finish rest of it today and start next action. This is still in messy and need to be cleaned. I have slightly changed how it displays deleted forum subforums and topics dropdown: before: now:
As you can see before you could select any option and then if selected option was current, locked or it was child forum error message appeared now those cases are displayed as disabled with information why.
There is lots of room for improvements I will be adding comments now to mark places for improvements and where change is needed.
There is one thing that I'm considering to change https://github.com/zikula-modules/DizkusModule/blob/master/Entity/ForumEntity.php#L185
from getForum_id()
to getForumId()
Symfony removes underscore when look for getters and setters. I think first I will duplicate getter and setter without underscore and will use new ones during refactor and at the end I will delete old ones.
Ok now I will delete old files and will check everything again there are issues I have them written down:
So now after removing old files and last check we will merge this. Above issues will be fixed one by one during api refactoring which will be discussed in different ticket.
Refactor Admin to new controller ref #262
https://www.youtube.com/watch?v=iCrargw1rrM