Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15162

Add support for universal edit button

    XMLWordPrintable

Details

    Description

      ref: http://universaleditbutton.org/Universal_Edit_Button

      Used by many wiki engines to show a universal edit button when your on a editable page.

      Reasons we should do this:

      • Might become part of html5 in some form and supported by next round of browsers.
      • Already supported by most wiki engines and wp(plugin).

      Reasons we should not do this:

      • Its not a standard by any means, and will undergo changes before it becomes one.
      • Only supported by plugins for Opera / Firefox
      • Spec currently defines content type as application/wiki witch is wrong (the content type of the link is most probably text/html, so it is very misleading) and does not suite eZ Publish very well as our content model is far richer then just wikis.
      • A page in eZ Publish can contain several elements that are editable, not just one.

      How to implement:
      From the wiki page this seems to be the form we should use

      <link rel="edit" type="application/x-wiki" title="Edit '<page_name>'!" href="/content/edit/<object_id>/f/<locale>" />
      

      So patch for ezwebin would be something like:

      Index: ezwebin/design/ezwebin/templates/link.tpl
      ===================================================================
      --- ezwebin/design/ezwebin/templates/link.tpl	(revision 3938)
      +++ ezwebin/design/ezwebin/templates/link.tpl	(working copy)
      @@ -16,4 +16,11 @@
       <link rel="Alternate" href={concat("layout/set/print/", $site.uri.original_uri)|ezurl} media="print" title="{'Printable version'|i18n('design/ezwebin/link')}" />
       {/if}
       
      +{if and( $current_node_id, $pagedata.is_edit|not )}
      +	{def $current_node = fetch( 'content', 'node', hash( 'node_id', $current_node_id ) )}
      +	{if $current_node.object.can_edit}
      +	  <link rel="edit" type="application/x-wiki" title="Edit '{$current_node.name}'!" href={concat( 'content/edit/', $current_node.contentobject_id, '/f/', ezini( 'RegionalSettings', 'ContentObjectLocale', 'site.ini') )|ezurl} />
      +	{/if}
      +	{undef}
      +{/if}
       {/default}
      \ No newline at end of file
      

      Attachments

        Activity

          People

            unknown unknown
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: