Blame view

sources/apps/files_sharing/templates/public.php 3.63 KB
6d9380f96   Cédric Dupont   Update sources OC...
1
  <?php /** @var $l OC_L10N */ ?>
f7d878ff1   kload   [enh] Update to 7...
2
3
4
5
  <?php $thumbSize=1024; ?>
  <?php if ( \OC\Preview::isMimeSupported($_['mimetype'])): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
  	<link rel="image_src" href="<?php p(OCP\Util::linkToRoute( 'core_ajax_public_preview', array('x' => $thumbSize, 'y' => $thumbSize, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?>" />
  <?php endif; ?>
03e52840d   Kload   Init
6
7
8
  <div id="notification-container">
  	<div id="notification" style="display: none;"></div>
  </div>
31b7f2792   Kload   Upgrade to ownclo...
9
  <input type="hidden" id="filesApp" name="filesApp" value="1">
03e52840d   Kload   Init
10
11
12
  <input type="hidden" id="isPublic" name="isPublic" value="1">
  <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
  <input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL">
31b7f2792   Kload   Upgrade to ownclo...
13
  <input type="hidden" name="sharingToken" value="<?php p($_['sharingToken']) ?>" id="sharingToken">
03e52840d   Kload   Init
14
15
  <input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename">
  <input type="hidden" name="mimetype" value="<?php p($_['mimetype']) ?>" id="mimetype">
6d9380f96   Cédric Dupont   Update sources OC...
16
17
18
19
20
  <header><div id="header" class="<?php p((isset($_['folder']) ? 'share-folder' : 'share-file')) ?>">
  		<a href="<?php print_unescaped(link_to('', 'index.php')); ?>"
  			title="" id="owncloud">
  			<div class="logo-wide svg"></div>
  		</a>
31b7f2792   Kload   Upgrade to ownclo...
21
  		<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
03e52840d   Kload   Init
22
  		<div class="header-right">
6d9380f96   Cédric Dupont   Update sources OC...
23
24
25
26
27
28
29
30
31
32
33
34
35
  			<span id="details">
  				<span id="save" data-protected="<?php p($_['protected'])?>" data-owner="<?php p($_['displayName'])?>" data-name="<?php p($_['filename'])?>">
  					<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
  					<form class="save-form hidden" action="#">
  						<input type="text" id="remote_address" placeholder="example.com/owncloud"/>
  						<button id="save-button-confirm" class="icon-confirm svg"></button>
  					</form>
  				</span>
  				<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
  					<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
  					<span id="download-text"><?php p($l->t('Download'))?></span>
  				</a>
  			</span>
03e52840d   Kload   Init
36
  		</div>
a293d369c   Kload   Update sources to...
37
  </div></header>
03e52840d   Kload   Init
38
  <div id="content">
31b7f2792   Kload   Upgrade to ownclo...
39
40
41
42
43
44
  	<div id="preview">
  		<?php if (isset($_['folder'])): ?>
  			<?php print_unescaped($_['folder']); ?>
  		<?php else: ?>
  			<?php if (substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'image'): ?>
  				<div id="imgframe">
31b7f2792   Kload   Upgrade to ownclo...
45
46
47
  				</div>
  			<?php elseif (substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'video'): ?>
  				<div id="imgframe">
6d9380f96   Cédric Dupont   Update sources OC...
48
  					<video tabindex="0" controls="" preload="none">
31b7f2792   Kload   Upgrade to ownclo...
49
50
51
  						<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
  					</video>
  				</div>
a293d369c   Kload   Update sources to...
52
  			<?php else: ?>
31b7f2792   Kload   Upgrade to ownclo...
53
  				<div id="imgframe">
a293d369c   Kload   Update sources to...
54
  					<?php $size = \OC\Preview::isMimeSupported($_['mimetype']) ? 500 : 128 ?>
6d9380f96   Cédric Dupont   Update sources OC...
55
56
57
58
  					<img
  						src="<?php p(OCP\Util::linkToRoute( 'core_ajax_public_preview', array('x' => $size, 'y' => $size, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?>"
  						class="publicpreview"
  						alt="" />
31b7f2792   Kload   Upgrade to ownclo...
59
  				</div>
31b7f2792   Kload   Upgrade to ownclo...
60
  			<?php endif; ?>
a293d369c   Kload   Update sources to...
61
62
63
64
65
66
67
68
69
70
  			<div class="directDownload">
  				<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
  					<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
  					<?php p($l->t('Download %s', array($_['filename'])))?>
  				</a>
  			</div>
  			<div class="directLink">
  				<label for="directLink"><?php p($l->t('Direct link')) ?></label>
  				<input id="directLink" type="text" readonly value="<?php p($_['downloadURL']); ?>">
  			</div>
03e52840d   Kload   Init
71
  		<?php endif; ?>
31b7f2792   Kload   Upgrade to ownclo...
72
  	</div>
a293d369c   Kload   Update sources to...
73
74
75
76
77
78
79
  
  </div>
  <footer>
  	<p class="info">
  		<?php print_unescaped($theme->getLongFooter()); ?>
  	</p>
  </footer>