ShawnClake / UserExtended

An extension to the existing RainLab.User plugin for OctoberCMS
http://octobercms.com/plugin/clake-userextended
GNU General Public License v3.0
23 stars 12 forks source link

Refactor the Roles Controller #71

Closed ShawnClake closed 7 years ago

ShawnClake commented 7 years ago

This file is quickly becoming a mammoth and needs some form of consistency and standards added in.

How did this happen?

Potential fixes:

Any other suggestions?

ShawnClake commented 7 years ago

Completed

  • Add a const list of renderable partials. Then create a render function which takes in an array of these const's and calls the respective render function and returns the made partials.
  • const UE_CREATE_GROUP_FORM = 'create_group_form';
  • const UE_LIST_ROLES_TABLE = 'list_roles_table';

In-Progress

Interactjs Lib has been added

  • Store the currently selected group in the session. Thus, a current group variable should never be passed to a partial.

Added functions for doing this, they aren't utilized yet though

  • Store the currently selected role in the session. Thus, a current role variable should never be passed to a partial.

Added functions for doing this, they aren't utilized yet though

ShawnClake commented 7 years ago

Completed

  • Change the naming of the partials to follow a standard: _action_type_displaytype_optional.htm _create_group_form.htm _list_roles_table.htm _manage_role_toolbar.htm _manage_group_toolbar.htm _update_group_form.htm _validate_group_form.htm
ShawnClake commented 7 years ago

Completed and added pushed back items to the push back list.