Cleaning up administration module for 4.7

recidive - June 22, 2006 - 10:16
Project:Administration
Version:HEAD
Component:Code
Category:feature request
Priority:critical
Assigned:recidive
Status:needs work
Description

Here is a patch that fixes several bugs found in administration module from cvs. Also, this patch adds the features in civicspace's zadministration module and civicspace.inc.

Features added:

  • A "Switch to classic view" link at the top of dashboard page and a "Return to administration front page" for dashboard subpages;
  • Move admin and admin/settings items to a single "configure modules" page in civicspace.inc;
  • Improve menu generation process;
  • New theming for civicspace.inc;
  • A 'after_build' property to the $config array, this sets a function to be called after the menu generation process;

Bugs Fixed:

  • Module settings not being saved (improved the administration settings form);
  • Load the right CSS file;
  • Remove empty sections/sub-panels and menu items of disabled/not installed modules;
  • Remove deprecated zadministration.module;
  • Added administration.install script that sets the weight of the module, so its functions are called finally.

The module is working fine with Drupal 4.7 and this patch, we need just to do some further tests.

Comments please!

AttachmentSize
administration_4.patch.txt68.26 KB

#1

recidive - June 22, 2006 - 10:29

Here is the images for the civicspace.inc theme. All images had to be in administration/images directory.

AttachmentSize
administration_images.tar.gz 25.87 KB

#2

recidive - June 22, 2006 - 22:50

I've striped out the patch with only the bugfixes part. Here is a more detailed list of the changes:

  • Improved module settings, they aren't being saved correctly;
  • Changed menu items type for sections from MENU_NORMAL_ITEM to MENU_ITEM_GROUPING so this doesn't shows up menu items for empty sections;
  • Removed a call to the deprecated tablesort_pager() function in default.inc;
  • Fixed default.inc and merged.inc settings forms;
  • Include the right .css file for the enabled config profile.
  • A couple of issues which are causing the menu not to set/unset properly;
  • Added administration.install script that sets the weight of the module, so its functions are called at last.

As soon as this patch has been commited I'll submit another one introducing the features we've made into the civicspace profile.

AttachmentSize
administration_bugfixes.patch.txt 15 KB

#3

der - June 23, 2006 - 02:00
Status:needs review» fixed

I've only had a chance to do a cursory code review and testing with on this on 4.7.2. I'm going to go ahead and commit these changes but not move the 4.7 tag yet. I would really like a few people to take it and run it through it's paces before I tag it.

I'll change this to "fixed" and if people find issues with it we can reopen it.

Also, feel free to submit the second (feature) patch but I'm not even going to consider it until we're happy we these changes and they are tagged as 4.7

So, anyone willing to test this please download the CVS/HEAD version and post your findings back here.

#4

Amazon - June 23, 2006 - 14:03

I tested the following:

* Module settings not being saved (improved the administration settings form);

I tested the form and changed between all the available menu's both disabled and enable and everything worked.

* Load the right CSS file;

I tested Default, CivicSpace, and Combined and each had a different CSS.

* Remove empty sections/sub-panels and menu items of disabled/not installed modules;

I enabled and disabled modules and they were accurately reflected in the interface. I need to test sections like Mail and subscription

* Remove deprecated zadministration.module;

Great.

* Added administration.install script that sets the weight of the module, so its functions are called finally.

This is a nice improvement over having to alphabetize the module.

#5

killes@www.drop.org - June 23, 2006 - 16:45

The patch looks ok to me. However, I didn't test it and I am also not very familiar with the module.

#6

vic.uzumeri - June 28, 2006 - 14:42

We're newbies. We installed the civicspace distribution two days ago and the install went well. We are still exploring its capabilities (we come from Joomla world).

I then noticed the "switch to classic view" and thought it might provide a simplified menu structure, so i clicked it.

Bad things happened:

1. the ?q=sadmin querystring format changed to /sadmin
2. the only visible page was an Administrator page with a log of administrative actions - no other menus and no obvious way to get to any menus.

I poked around in a parallel installation that was still in the original format and found that the switch called a ?q=deactivate parameter. I took a chance and tried "/activate." It partially worked. It didn't restore the ?q= capability, but it brought back a stripped down version of the administrative dashboard.

Any help would be appreciated. We are still early in development and we can reinstall, but I would like to avoid this occurring again. If it did, I would like to be able to recover.

VU

#7

der - June 28, 2006 - 18:00
Status:fixed» needs work

Setting this to "code needs work" due to grapes reported issues. I don't have time to test this today but if the original patch author has time to look at it that would be great.

 
 

Drupal is a registered trademark of Dries Buytaert.