Details
-
Story
-
Resolution: Obsolete
-
High
-
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);