This patch will allow custom paths for bundle administration page and entites pages.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webadpro’s picture

FileSize
24.68 KB

New patch with some fixes and upgrade path.

webadpro’s picture

FileSize
6 KB

Apply this new patch on the path branch.

webadpro’s picture

FileSize
920 bytes

Fix minor bugs which PHP 5.3 doesn't like.

webadpro’s picture

FileSize
3.31 KB

Fixed a couple more things.

webadpro’s picture

FileSize
4.36 KB

New Patch.

webadpro’s picture

FileSize
6.27 KB
webadpro’s picture

FileSize
8.38 KB
webadpro’s picture

FileSize
8.91 KB
webadpro’s picture

FileSize
8.91 KB

Please Commit this patch and ignore the others.

dgastudio’s picture

$ curl http://drupal.org/files/fixes_to_apply.patch | git apply
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9127 100 9127 0 0 14654 0 --:--:-- --:--:-- --:--:-- 19585
:88: trailing whitespace.

:143: trailing whitespace.
$edit_path = str_replace('%', $id, $crud_info['edit']['path']);
:145: trailing whitespace.
'title' => t('edit'),
:146: trailing whitespace.
'href' => $edit_path,
:158: trailing whitespace.
'title' => t('delete'),
error: patch failed: eck.bundle.inc:244
error: eck.bundle.inc: patch does not apply
error: patch failed: eck.entity.inc:152
error: eck.entity.inc: patch does not apply

webadpro’s picture

Sorry but this patch doesn't work with the 7.x branch. Only with Change_path branch.

fmizzell’s picture

there has been no changes to the 7.x branch since the creation of the change_path branch, so it should be safe to change to that branch and apply the patch until I get some time to merge things.

webadpro’s picture

Also, this patch http://drupal.org/node/1824772#comment-6728086 should get added also. It would be a great addition.

fmizzell’s picture

@webadpro I know that you probably been one of the few that have actually used this patch extensively, how useful have you found being able to change the page of every entity action (delete, view, edit)? It seems to me like most of the time you only care to move the list and possibly the view, but delete and edit will go with it. Your input is greatly appreciated.

webadpro’s picture

Hi,

I've used this quite often including delete, view and edit paths.

Having a custom path:

view : user/%/notes
edit: user/%/notes/%/edit <- this makes a lot more sense then entity_type/bundle/%/edit.

Same thing with Edit. Although I just noticed quite a lot of commits has been done to the latest dev, so you might be having a hard time merging the patch now.

But I can't wait to see this actually implemented into ECK.

fmizzell’s picture

the change_paths branch now has the last patch, plus it has been merged with the last commits from 7.x-2.x

fmizzell’s picture

Assigned: Unassigned » fmizzell

One of the things that I enjoy about using eck is that it is pretty straight forward to navigate through all the information. This new code kind of breaks the pattern of navigation. Currently, every time you click on an entity type, or bundle name, you end up in a list, but with the patch clicking on a bundle name makes you end in the edit form, instead of the list of entities of that bundle. I understand why this was done, now that we can move that whole section around (the bundle management section), it seems more appropriate to end up in a place were you are dealing with bundles and not with entities. I want to attempt to fix that, in a way that moving things around works as designed in the patch, but that when nothing is moved, the navigation experience stays as is.

The other thing that I would like to change before committing this work is the db update. The db update has already been written, and from my test it works well, but I think that we can eliminate the need for that db update, simply by putting a little logic that uses default paths if no custom paths have been set. In my opinion if a db update is not absolutely necessary, it is better not to have one.

I will be reporting as I get this work done, feel free to point out any objections on the proposed changes.

webadpro’s picture

Hi,

Well rather than a db update, use the same code and simply do an isset for the data, if its not found simply use the function provided.

Feel free to make any changes to the code.

My 2 cents.

fmizzell’s picture

@webadpro thanks, that is exactly what I was thinking

webadpro’s picture

Sounds Great.

webadpro’s picture

Also, I think adding in a way to remove the view path would be something useful sometimes.

Edit path is fine, but sometimes we do not want to have any view path at all.

fmizzell’s picture

Assigned: fmizzell » Unassigned

Ok, I just got the two things mentioned done, they are in the branch, but I noticed that the edit and delete paths were not being respected, they just followed the view path around. I did not mess with the code that creates those paths, so I am not sure what the original behaviour, or what the intended behaviour is supposed to be.

@webadpro: if you have a few minutes to review, I will appreciate it

webadpro’s picture

@fmizzell, Its not a problem, I can test the new changes and I will post updates. :)

webadpro’s picture

@fmizzell, Where are we at with these patches?

fmizzell’s picture

Sorry, I have been trying to push 3.x out the door, but I have been thinking about this issue a lot. I am not sure that I like the current solution, maybe we should get on irc and talk about it :)

fmizzell’s picture

Category: Task » Feature request
Issue summary: View changes
fmizzell’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
BarwonHack’s picture

Supporting this request: To create custom add and edit paths per entity will be very useful.

Cheering on first formal 3.x release!

legolasbo’s picture

Status: Needs review » Closed (won't fix)

Closing this issue because 7.x-3.x is unsupported. See #2495527: 3.x Roadmap: Unsupported, do NOT use

Please reopen the issue and move it to the 7.x-2.x branch if it is still/also relevant in 7.x-2.x.