Created
December 8, 2015 21:48
-
-
Save jehkinen/3ecbc5928865f7f30841 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cs = Yii::app()->getClientScript(); | |
$cs->registerCSSFile('/css/global-form-elements.css'); | |
$cs->registerCSSFile('/css/global-font.css'); | |
$cs->registerCSSFile('/css/global-layout.css'); | |
$cs->registerCSSFile('/css/upload.css'); | |
$cs->registerScriptFile('/js/remove_footer.js'); | |
?> | |
<div class="c-upload-finish gl-block--bordered"> | |
<div class="c-col-1 gl-float--left"> | |
<a href="<?= $model->getViewUrl() ?>"> | |
<img src="<?= $model->getThumbUrl() ?>"> | |
</a> | |
</div> | |
<div class="c-col-2 gl-float--left"> | |
<div class="c-upload__headline"> | |
<a href="<?=$model->getViewUrl()?>"> | |
<?=$model->name?> | |
</a> | |
</div> | |
<div class="c-upload__tabs"> | |
<div class="c-btn-update"> | |
<?= CHtml::link('Upload More', ['document/upload', 'id' => $model->id], ['class' => 'btn btn-white'])?> | |
<?= CHtml::link('Update ' . $model->labelByType($model->type), ['document/edit', 'id' => $model->id], ['class' => 'btn btn-white edit'])?> | |
</div> | |
<ul class="c-tabs-buttons nav nav-tabs" id="myTab"> | |
<li class="active"><a href="#c-tab-share" data-toggle="tab">Share</a></li> | |
<li><a href="#c-tab-embed" data-toggle="tab">Embed</a></li> | |
<li><a href="#c-tab-email" data-toggle="tab">Email</a></li> | |
</ul> | |
<div class="c-tabs-panes tab-content"> | |
<div class="tab-pane active" id="c-tab-share"> | |
<?php if(Yii::app()->params['share_this']):?> | |
<div> | |
<?php $serviceClasses = [ | |
'st_sharethis_large', | |
'st_twitter_large', 'st_linkedin_large', | |
'st_facebook_large','st_googleplus_large', 'st_buffer_large', | |
'st_email_large' | |
]?> | |
<?php foreach($serviceClasses as $serviceClass):?> | |
<span | |
class="<?=$serviceClass?>" | |
st_url="<?=$model->getViewUrl()?>" | |
st_title="<?=$model->name . ' ' . $model->labelByType($model->type)?>" | |
st_image="<?=$model->getThumbUrl()?>" | |
st_summary="<?=$model->description?>" | |
displayText='Share <?=$model->name . ' ' . $model->labelByType($model->type)?>'> | |
</span> | |
<?php endforeach; ?> | |
</div> | |
<?php endif;?> | |
<input value="<?=$model->getViewUrl() ?>" id="c-upload__input--share" type="text" class="gf-input c-upload-finish-input gl-margin-top--small" placeholder = "share link"> | |
<?php if (Yii::app()->user->hasFlash('shared_message')) :?> | |
<div class="c-upload-finish-msgtemp gl-margin-top--small"> | |
<?=Yii::app()->user->getFlash('shared_message')?> | |
</div> | |
<?php endif; ?> | |
</div> | |
<div class="tab-pane" id="c-tab-embed"> | |
<textarea style="min-height: 150px" id="c-upload__input--embed" type="text" class="gf-input c-upload-finish-input" placeholder = "embed code"> | |
<iframe id="boxcom" src="<?=Yii::app()->createAbsoluteUrl('/document/getEmbed', ['id' => $model->id]) ?>" width="357" height="420" frameborder="1" marginwidth="0"marginheight="0" scrolling="yes"></iframe> | |
</textarea> | |
</div> | |
<div class="tab-pane" id="c-tab-email"> | |
<?php $form = $this->beginWidget('application.components.widgets.bootstrap.VendoriTbActiveForm', [ | |
'action' => Yii::app()->urlManager->createUrl('document/SendDocumentAccess'), | |
'id'=>'email-form', | |
'type'=>'horizontal', | |
'enableClientValidation' => true, | |
'clientOptions'=>[ | |
'validateOnSubmit' => true, | |
], | |
]); ?> | |
<?= $form->textField($emailForm, 'email', ['class' => 'add_user_selectize', 'placeholder' => 'To']); ?> | |
<?= $form->error($emailForm, 'email'); ?> | |
<br/> | |
<br/> | |
<?= $form->textField($emailForm, 'message', ['class' => 'c-upload-finish-input', 'placeholder' => 'Optional Message']); ?> | |
<?= $form->error($emailForm, 'message'); ?> | |
<div class="clearfix"></div> | |
<?php $this->widget('bootstrap.widgets.TbButton',[ | |
'buttonType' => 'submit', | |
'type' => 'primary', | |
'label' => 'send email', | |
'htmlOptions' => ['class' => 'btn btn-cyan gl-margin-top--element'] | |
]); ?> | |
<?php $this->endWidget(); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="clearfix"> | |
</div> | |
</div> | |
<?php if(Yii::app()->params['share_this']):?> | |
<div id="publisher" data-value="<?=Yii::app()->params['share_this'];?>"></div> | |
<script type="text/javascript">var switchTo5x=true;</script> | |
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
var publisher = $('#publisher').attr('data-value'); | |
stLight.options({ | |
publisher: publisher, | |
doNotHash: false, | |
doNotCopy: false, | |
hashAddressBar: false | |
}); | |
$('#c-upload__input--share').focus().select(); | |
}) | |
</script> | |
<?php endif;?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment