Views Node Edit (VNE) is a Drupal 7 module that adds an edit column to Views tables, which creates links to the node edit form for the corresponding node. Using the configuration menu, you can chose which views these edit links should appear on. The cool thing about Views Node Edit is that it can be enabled for all views in one click and allow a sites maintainers to quickly edit a node in its entirety from its row in a view. This is my first module, but its functionality is something I've been looking for since I started working with Drupal in July and have yet to find a solid solution for.

Thanks for checking it out, and happy holidays!

Project page: http://drupal.org/sandbox/zbabtkis/1872302

Git: git clone --recursive --branch 7.x-1.1 http://git.drupal.org/sandbox/zbabtkis/1872302.git views_node_edit

CommentFileSizeAuthor
Screenshot19.3 KBzbabtkis

Comments

arjkap’s picture

Hi,

you need to delete the master branch in your repository. Refer point 6. http://drupal.org/empty-git-master

Your .info file should not contain "version". This will be automatically created by drupal.org.

The function comment style used is incorrect. It should end in "*/".
Please correct according to http://drupal.org/node/1354#general.

Use all caps for "true" and "null".

Remove the coding standard errors-
http://ventral.org/pareview/httpgitdrupalorgsandboxzbabtkis1872302git

Regards,
arjkap

anwar_max’s picture

Status: Needs review » Needs work

Hi zbabtkis,

This is a nice module and this is going to be helpful tool for developers but there are some small issues which you need to fix it.
1) Select all checkbox is not working as expected. When we click on the select all checkbox then it should select all the checkbox which comes under this.
2) Edit link which is coming on the view is not working as expected you need to take care of the path. Right now it is not working properly you should use base_path() function to add the base path in the link. Like below code:

$base_path = base_path();
drupal_add_js("(function ($) { $('.$table_name tbody tr:eq($row_counter)').prepend('<td class=\"views-node-edit\"><a href=\"{$base_path}node/$nid/edit\">[edit]</a></td>'); })(jQuery); ",array("type"=>"inline","scope"=>"footer","weight"=>5));
jnicola’s picture

So I am unable to get this module to work in the dev environment I setup for doing module reviews. I'm not sure if I'm following what it's supposed to do exactly though, so some clarity may be nescessary.

I created a content type (basic page) and I created 50 pieces of random content using devel. I created a view just outputing the nodes, and I enabled your module to work on my view. I see no edit links, either when displaying as a node, or using table output.

I'm curious as to why you're attempting to deliver this exactly? Views already has "content: edit link" available as a field built in, and contextual links offer edit links when viewing nodes. I'm not sure what this module is delivering that can't be done already?

I bet I'm missing something. Please let me know what I'm missing :)

EDIT: Is it standard practice to include javascript/jQuery inside of the PHP module? It might be easier if your broke it out into it's own .js file?

zbabtkis’s picture

Thanks for the reply! I'll check out what could be causing the edit links to not show up. Do you have javascript enabled on your browser and jQuery enabled on your site? I'll work on getting some better documentation up, but here's my reason for making this module: I've never liked the idea of creating a new field in the view just to display an edit link to users -- it always seemed messy to mix content with admin stuff. Also this field is missing from a lot of views I've worked with and instead of adding it to each view manually, a quick way to apply this functionality to all views seems useful. Let me know if that answers your question.

zbabtkis’s picture

I did some more work over the holiday and fixed all the issues people mentioned (at least I think I have). The module now works with views that use AJAX and the checkall box is now working. I moved all JS to separate files and the formatting issues arjkap brought up are now fixed as well. Still looking for more great feedback. Thanks everyone!

zbabtkis’s picture

Issue summary: View changes

changed branch to core-version

mikespence’s picture

Manual Review:

Your CSS file needs some work:

  • You need to put a space before each {. For example: table .views-node-edit {
  • Never use !important in your css files, this stops people from overwriting them for their theme
  • CSS Properties should be listed in alphabetical order. E.g. background before width
mikespence’s picture

PA robot’s picture

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

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

Updated git command