Hi,
I would like to suggest some features to make it easier to maintain blocks. I will explain and motivate these features briefly.
1.) Make it possible to add a block that is visible on the current page directly.
Rationale: if I have to add a block that is visible on the page I'm visiting I have to remember (or copy paste) the path, click on "add block" and fill it out in the "visibility" field. It would be much more convenient if the visibility automatically contains the path of the page where I have pressed the "add block" link.
Implementation: the required path can be obtained by the HTTP-referer.
2.) Make it easier to modify blocks.
Rationale: currently, if I would like to modify a block I have to navigate to the node (for example by going to admin/content/node) and modify it from there. It would be much more convenient to display an edit button near each block right away.
Implementation: only show this link if the user is actually allowed to edit the block.
I have attached a patch wherein I have implemented both features. Moreover, for both features I've added an option to the settings page so that these features can be disable if required by the end user. I've made these settings global instead of per content type or block because I don't think the latter is particularly useful.
Comments
Comment #1
Robbert commentedComment #2
swentel commentedNice stuff! I'll probably commit the patch this weekend. A new release will probably follow pretty soon as I have some other minor stuff waiting in the pipeline, I'll update you later!
Comment #3
swentel commentedCommitted these changes, see http://drupal.org/cvs?commit=335692 (and follow ups)
Added the '(edit)' text also as a setting on the configuration page.
I seem to have one small problem with this line on my Mac:
Removing the slash makes it work ok - going to todo some more tests on my linux machine at work to see what's the best option here.
Comment #4
swentel commentedOk, did a check on '/' in the http_referer variable - marking as fixed, new release will follow in a week or so.