ENHANCEMENT Saving tab state for CMSPagesController

This commit is contained in:
Ingo Schommer 2012-05-30 16:04:51 +02:00
parent c9fc7cda65
commit ad7c443255
2 changed files with 9 additions and 2 deletions

View File

@ -15,6 +15,13 @@ class CMSPagesController extends CMSMain {
return false; return false;
} }
/**
* @return String
*/
public function ViewState() {
return $this->request->getVar('view');
}
/** /**
* Doesn't deal with a single record, and we need * Doesn't deal with a single record, and we need
* to avoid session state from previous record edits leaking in here. * to avoid session state from previous record edits leaking in here.

View File

@ -9,10 +9,10 @@
<div class="cms-content-header-tabs"> <div class="cms-content-header-tabs">
<ul> <ul>
<li class="content-treeview"> <li class="content-treeview<% if ViewState == tree %> ui-tabs-selected<% end_if %>">
<a href="#cms-content-treeview" class="cms-panel-link" data-href="$LinkTreeView"><% _t('CMSPagesController.TreeView', 'Tree View') %></a> <a href="#cms-content-treeview" class="cms-panel-link" data-href="$LinkTreeView"><% _t('CMSPagesController.TreeView', 'Tree View') %></a>
</li> </li>
<li class="content-listview"> <li class="content-listview<% if ViewState == list %> ui-tabs-selected<% end_if %>">
<a href="#cms-content-listview" class="cms-panel-link" data-href="$LinkListView"><% _t('CMSPagesController.ListView', 'List View') %></a> <a href="#cms-content-listview" class="cms-panel-link" data-href="$LinkListView"><% _t('CMSPagesController.ListView', 'List View') %></a>
</li> </li>
<!-- <!--