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

As a developer, I want an API to handle redirections after tabs actions

    XMLWordPrintable

Details

    • Icon: Story Story
    • Resolution: Obsolete
    • Icon: High High
    • 2.0.0-alpha3
    • None
    • None
    • None

    Description

      When an action is performed from a tab, the app expects a partial response with the contents of the tab only. There are two known cases: reload the tab, and change the app's main content.

      Structure

      The chosen approach was an abstract LocationTabController with specific methods.

      Reload the tab

      The response is a standard redirect to /view/content/<contentId>/<viewType>/false/<locationId>. A method should be added to tab controllers for that:

      Example to reload the versions tab:

      $this->reloadTab('versions', $location, $content);
      

      To avoid repeating the tab identifier all over a controller, the LocationTabController could have an abstract method getTabIdentifier() that requires controllers extending from it, and uses it to build the URL.

      Changing the overall locationview

      Some operations (such as removing locations) may make the current location invalid. In that case, the app must be notified that a new location must be loaded.

      The Response should be 205 with an App-Location header specifying the new URL.

      Suggestion:

      $this->redirectToLocationView($content, $location);
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bertrand.dunogier@ibexa.co Bertrand Dunogier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: