protected function resolveAndRenderLockingLink($renderedInForm)
 {
     $isViewLocked = ZurmoDefaultViewUtil::getLockKeyForDetailsAndRelationsView('lockPortletsForDetailsAndRelationsView');
     if ($isViewLocked === false) {
         $title = Zurmo::t('Core', 'Lock and prevent layout changes to this screen');
         $url = $this->resolveLockPortletUrl($this->params["relationModel"]->id, true);
         $icon = ZurmoHtml::tag('i', array('class' => 'icon-unlock'), '<!--' . Zurmo::t('Core', 'Lock') . '-->');
         $link = ZurmoHtml::link($icon, $url, array('title' => $title));
         $content = ZurmoHtml::tag('nav', array('class' => 'default-button'), $link);
         $content = parent::renderActionElementBar($renderedInForm) . $this->renderPushLayoutButton() . $content;
     } else {
         $title = Zurmo::t('Core', 'Unlock to edit this screen\'s layout');
         $url = $this->resolveLockPortletUrl($this->params["relationModel"]->id, false);
         $icon = ZurmoHtml::tag('i', array('class' => 'icon-lock'), '<!--' . Zurmo::t('Core', 'Unlock') . '-->');
         $content = ZurmoHtml::link($icon, $url, array('title' => $title));
         $content = ZurmoHtml::tag('nav', array('class' => 'default-button'), $content);
     }
     return $content;
 }
 /**
  * @param bool $renderedInForm
  * @return A|string
  */
 protected function renderActionElementBar($renderedInForm)
 {
     $getData = GetUtil::getData();
     $toolbarContent = '';
     if (Yii::app()->userInterface->isMobile() === false) {
         $isViewLocked = ZurmoDefaultViewUtil::getLockKeyForDetailsAndRelationsView('lockPortletsForDetailsAndRelationsView');
         $lockTitle = Zurmo::t('Core', 'Unlock to edit this screen\'s layout');
         $unlockTitle = Zurmo::t('Core', 'Lock and prevent layout changes to this screen');
         if ($isViewLocked === false) {
             $url = $this->resolveLockPortletUrl((int) $getData['id'], '1');
             $link = ZurmoHtml::link('<!--' . Zurmo::t('Core', 'Lock') . '-->', $url, array('class' => 'icon-unlock', 'title' => $unlockTitle));
             $content = parent::renderActionElementBar($renderedInForm) . $link;
         } else {
             $url = $this->resolveLockPortletUrl((int) $getData['id'], '0');
             $link = ZurmoHtml::link('<!--' . Zurmo::t('Core', 'Unlock') . '-->', $url, array('class' => 'icon-lock', 'title' => $lockTitle));
             $content = $link;
         }
         $toolbarContent = ZurmoHtml::tag('div', array('class' => 'view-toolbar'), $content);
     }
     $toolbarContent = ZurmoHtml::tag('div', array('class' => 'view-toolbar-container widgets-lock clearfix '), $toolbarContent);
     return $toolbarContent;
 }