Skip to content

Commit

Permalink
Merge pull request #835 from plone/davisagli-edit-link
Browse files Browse the repository at this point in the history
Fix edit link
  • Loading branch information
jensens authored Mar 26, 2018
2 parents bc6cff1 + 2bab768 commit 21f8830
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ New features:
- Include TinyMCE 4.7.6
[frapell]


Bug fixes:

- Link to /edit rather than /@@edit from structure pattern actions.
This fixes the link for Archetypes content items.
[davisagli]

- add items here


Expand Down
2 changes: 1 addition & 1 deletion mockup/patterns/structure/js/actionmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ define(['underscore'], function(_) {
var typeToViewAction = app.options.typeToViewAction;
var viewAction = typeToViewAction && typeToViewAction[model.portal_type] || '';
result.openItem.url = model.getURL + viewAction;
result.editItem.url = model.getURL + '/@@edit';
result.editItem.url = model.getURL + '/edit';

return result;
};
Expand Down
2 changes: 1 addition & 1 deletion mockup/tests/pattern-structure-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ define([
expect(item.data().id).to.equal('item9');
expect($('.title a.manage', item).attr('href')).to.equal('http://localhost:9876/item9');
expect($('.actionmenu a.openItem', item).attr('href')).to.equal('http://localhost:9876/item9');
expect($('.actionmenu a.editItem', item).attr('href')).to.equal('http://localhost:9876/item9/@@edit');
expect($('.actionmenu a.editItem', item).attr('href')).to.equal('http://localhost:9876/item9/edit');
});

it('test navigate to folder push states', function() {
Expand Down

0 comments on commit 21f8830

Please sign in to comment.