示例#1
0
?>
<ul>
<?php 
$themeURL = Yii::app()->theme->getBaseUrl();
Yii::app()->clientScript->registerScript('logos', "\n\$(window).load(function(){\n\tif((!\$('#main-menu-icon').length) || (!\$('#x2touch-logo').length) || (!\$('#x2crm-logo').length)){\n\t\t\$('a').removeAttr('href');\n\t\talert('Please put the logo back');\n\t\twindow.location='http://www.x2engine.com';\n\t}\n\tvar touchlogosrc = \$('#x2touch-logo').attr('src');\n\tvar logosrc=\$('#x2crm-logo').attr('src');\n\tif(logosrc!='{$themeURL}/images/x2footer.png'|| touchlogosrc!='{$themeURL}/images/x2touch.png'){\n\t\t\$('a').removeAttr('href');\n\t\talert('Please put the logo back');\n\t\twindow.location='http://www.x2engine.com';\n\t}\n});\n");
$count = 0;
foreach ($recentItems as $item) {
    if (++$count > 5) {
        break;
    }
    echo '<li>';
    if ($item['type'] == 't') {
        //item is a action
        $description = CHtml::encode($item['model']->actionDescription);
        if (strlen($description) > 123) {
            $description = substr($description, 0, 120) . '...';
        }
        $link = '<strong>' . Yii::t('app', 'Due') . ': ' . date("Y-m-d", $item['model']->dueDate) . '</strong><br />' . MediaChild::attachmentActionText($description);
        //$link = '<strong>'.$item['model']->dueDate.'</strong><br />'.$item['model']->actionDescription;
        echo CHtml::link($link, array('/actions/' . $item['model']->id));
    } else {
        if ($item['type'] == 'c') {
            //item is a contact
            $link = '<strong>' . $item['model']->firstName . ' ' . $item['model']->lastName . '</strong><br />' . $item['model']->phone;
            echo CHtml::link($link, array('/contacts/' . $item['model']->id));
        }
    }
    echo "</li>\n";
}
?>
</ul>
示例#2
0
					echo CHtml::link(Yii::t('actions','Complete'),array('actions/complete','id'=>$data->id,'redirect'=>1),array('class'=>'x2-button'));
					//echo CHtml::link(Yii::t('actions','Complete + New'),array('actions/complete','id'=>$data->id,'redirect'=>1,'createNew'=>1),array('class'=>'x2-button'));
				}
			}
			//if ($data->type != 'note')
				//echo CHtml::link(Yii::t('actions','View'),array('actions/view','id'=>$data->id),array('class'=>'x2-button'));
			?>
		</div>
	</div>
	<div class="description">
		<?php
		$template="<a href=".$this->createUrl('search/search?term=%23\\2')."> #\\2</a>";
			$info=$data->actionDescription;
			$info=mb_ereg_replace('(^|\s)#(\w\w+)',$template,$info);
		if($data->type=='attachment' && $data->completedBy!='Email')
			echo MediaChild::attachmentActionText($data->actionDescription,true,true);
		else
			echo $this->convertLineBreaks($info,true);	// convert LF and CRLF to <br />
		?>
	</div>
	<div class="footer">
	<?php if(empty($data->type)) {
		if ($data->complete == 'Yes') {
			echo Yii::t('actions','Completed by {name}',array('{name}'=>UserChild::getUserLinks($data->completedBy)));
		} else {
			$userLink = UserChild::getUserLinks($data->assignedTo);
			$userLink = empty($userLink)? Yii::t('actions','Anyone') : $userLink;
			echo Yii::t('actions','Assigned to {name}',array('{name}'=>$userLink));
		}
	} else if ($data->type == 'note') {
		echo UserChild::getUserLinks($data->completedBy);
示例#3
0
        echo CHtml::link('[' . Yii::t('actions', 'Uncomplete') . ']', array('/actions/default/uncomplete', 'id' => $data->id, 'redirect' => 1), array());
    } else {
        echo CHtml::link('[' . Yii::t('actions', 'Complete') . ']', array('/actions/default/complete', 'id' => $data->id, 'redirect' => 1), array());
    }
}
if ($data->type != 'workflow') {
    echo $data->type != 'attachment' ? ' ' . CHtml::link('[' . Yii::t('actions', 'Update') . ']', array('/actions/default/update', 'id' => $data->id, 'redirect' => 1), array()) . ' ' : "";
    echo ' ' . CHtml::link('[x]', '#', array('onclick' => 'deleteAction(' . $data->id . '); return false'));
}
?>
		</div>
	</div>
	<div class="description">
		<?php 
if ($type == 'attachment' && $data->completedBy != 'Email') {
    echo MediaChild::attachmentActionText($this->convertUrls($data->actionDescription), true, true);
} else {
    if ($type == 'workflow') {
        if (!empty($data->stageNumber) && !empty($data->workflowId) && $data->stageNumber <= count($stageRecords)) {
            if ($data->complete == 'Yes') {
                echo ' <b>' . Yii::t('workflow', 'Completed') . '</b> ' . date('Y-m-d', $data->completeDate);
            } else {
                echo ' <b>' . Yii::t('workflow', 'Started') . '</b> ' . date('Y-m-d', $data->createDate);
            }
        }
        if (isset($data->actionDescription)) {
            echo '<br>' . $data->actionDescription;
        }
    } else {
        echo $this->convertUrls($data->actionDescription);
    }
示例#4
0
 * 
 * You can contact X2Engine, Inc. at P.O. Box 66752,
 * Scotts Valley, CA 95067, USA. or at email address contact@X2Engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 ********************************************************************************/
 
$attributeLabels = MediaChild::attributeLabels();

$parts = explode('.',$model->fileName);			// split filename on '.'
$file_ext = strtolower($parts[count($parts)-1]);	// extension is the last part

$legal_extensions = array('jpg','gif','png','bmp','jpeg','jpe');

$fileView = '';
if(in_array($file_ext,$legal_extensions))
	$fileView .= CHtml::image(Yii::app()->request->baseUrl.'/uploads/'.urlencode($model->fileName),'',array('class'=>'attachment-img'));
?>
<div class="form no-border" style="margin:0;">
<table class="details">
	<tr>
		<td class="label">
			<label><?php echo $attributeLabels['fileName']; ?></label>
示例#5
0
    $recipient = $temp->fullName;
    $modifier = ' &raquo; ';
} else {
    $recipient = '';
    $modifier = '';
}
?>
	<?php 
echo CHtml::link($author, array('profile/view', 'id' => $authorRecord->id)) . $modifier . CHtml::link($recipient, $data->associationId);
?>
 <span class="comment-age"><?php 
echo x2base::timestampAge(date("Y-m-d H:i:s", $data->timestamp));
?>
</span><br />
	<?php 
echo MediaChild::attachmentSocialText($data->data, true, true);
?>
<br />
	<?php 
if (count($commentDataProvider->getData()) > 0) {
    $this->widget('zii.widgets.CListView', array('dataProvider' => $commentDataProvider, 'itemView' => '../social/_view', 'template' => '{items}'));
}
echo CHtml::beginForm('addComment', 'get', array('style' => 'display:none;', 'id' => 'addReply-' . $data->id));
echo CHtml::textArea('comment', '', array('style' => 'heght:40px; width:440px;display:block;clear:both;'));
echo CHtml::hiddenField('id', $data->id);
echo CHtml::hiddenField('redirect', Yii::app()->controller->action->id);
echo CHtml::submitButton(Yii::t('app', 'Submit'), array('class' => 'x2-button float'));
echo CHtml::endForm();
?>
</div>
<?php