zikula-modules / DizkusModule

Official repository for Dizkus, a fully integrated forum solution for Zikula 1.4+
21 stars 7 forks source link

Admin to new controller #291

Closed Kaik closed 8 years ago

Kaik commented 8 years ago

Refactor Admin to new controller ref #262

https://www.youtube.com/watch?v=iCrargw1rrM

Kaik commented 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. screenshot from 2016-08-22 19-47-31

Kaik commented 8 years ago

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.

craigh commented 8 years ago

There are issues in 4.0.0

as I said, it was never finished.

Kaik commented 8 years ago

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.

Kaik commented 8 years ago

Note to self assignranksAction will not use form class only plain html form.

Kaik commented 8 years ago

@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?

craigh commented 8 years ago

I can't see your code, how would I know?

craigh commented 8 years ago

Do you have any suggestions?

I think you need to use ForumUserEntity maybe? and not UserEntity

Kaik commented 8 years ago

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.

craigh commented 8 years ago

I think you need to use ForumUserEntity maybe? and not UserEntity

not all users.

Kaik commented 8 years ago

Unless we can base only on ForumUserEntity but core user is "copied" to forum user only when he post something.

craigh commented 8 years ago

right

Kaik commented 8 years ago

I have tried to stick to 4.0.0 behaviour select there is populating all users even guest.

craigh commented 8 years ago

I'm sorry, I have no idea. you'll have to work it out.

Kaik commented 8 years ago

:) Ok then I will come out with something.

Kaik commented 8 years ago

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: screenshot from 2016-09-07 16-14-07 now: screenshot from 2016-09-07 16-10-01

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.

Kaik commented 8 years ago

Ok now I will delete old files and will check everything again there are issues I have them written down:

  1. Forum tree few template changes so it will be prepared for single page management of the tree. Mostly moving forums up and down without refreshing the whole page.
  2. Ranks images path.
  3. Deleting honorary rank fail - need to look why.
  4. Delete forum - sync error - will be fixed during api refactor.
  5. Update all 3party libs like chosen or autocomplete vs use ones that come with the core.
  6. Manage subscriptions user search field - autocomplete shows in the wrong place - way below search field - updating 3part libs will probably solve it.
  7. hooksConfigAction - locked forums probably shouldn't be selectable.
  8. Implement external sources - it is removed in this version. Apart from above lots of cleaning remove ModUtil, System etc. Some of forms can be moved to separate files.

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.