Beispiel #1
0
 public static function getCreateLinkStr($productId, $type, $userId)
 {
     $actionStr = '';
     $myTemplateArr = self::getUserTemplate($productId, $type, $userId);
     foreach ($myTemplateArr as $template) {
         $deleteLinkStr = CommonService::getDeleteLink('template', $template['id']);
         $actionStr .= '<li id="user_template_' . $template['id'] . '">' . $deleteLinkStr . '&nbsp;&nbsp;<a href="' . Yii::app()->createUrl('info/edit', array('type' => $type, 'action' => Info::ACTION_OPEN, 'template_id' => $template['id'])) . '" target="_blank" title="' . $template['title'] . '">' . CHtml::encode($template['title']) . '</a></li>';
     }
     return $actionStr;
 }
Beispiel #2
0
 public static function getQueryLinkStr($productId, $type, $userId)
 {
     $actionStr = '';
     $actionStr .= '<li><a class="basic" href="' . Yii::app()->createUrl('info/index', array('type' => $type, 'product_id' => $productId, 'query_id' => -3)) . '" title="' . Yii::t('Common', 'Marked by me') . '">' . self::getMarkedByMeLink($productId, $type, $userId) . '</a></li>';
     $actionStr .= '<li><a class="basic" href="' . Yii::app()->createUrl('info/index', array('type' => $type, 'product_id' => $productId, 'query_id' => -2)) . '" title="' . Yii::t('Common', 'Assigned to me') . '">' . self::getAssignToMeLink($productId, $type, $userId) . '</a></li>';
     $actionStr .= '<li><a class="basic" href="' . Yii::app()->createUrl('info/index', array('type' => $type, 'product_id' => $productId, 'query_id' => -4)) . '" title="' . Yii::t('Common', 'Mailed to me') . '">' . self::getMailedToMeLink($productId, $type) . '</a></li>';
     $actionStr .= '<li><a class="basic" href="' . Yii::app()->createUrl('info/index', array('type' => $type, 'product_id' => $productId, 'query_id' => -1)) . '" title="' . Yii::t('Common', 'Opened by me') . '">' . self::getOpenedByMeLink($productId, $type, $userId) . '</a></li>';
     $myQueryArr = self::getUserQuery($productId, $type, $userId);
     foreach ($myQueryArr as $query) {
         $deleteLinkStr = CommonService::getDeleteLink('query', $query['id']);
         $actionStr .= '<li id="user_query_' . $query['id'] . '">' . $deleteLinkStr . '<a href="' . Yii::app()->createUrl('info/index', array('type' => $type, 'product_id' => $productId, 'query_id' => $query['id'])) . '" class="user_query_a">' . CHtml::encode($query['title']) . '</a></li>';
     }
     return $actionStr;
 }