Permalink
Browse files

translation, mini-view

  • Loading branch information...
1 parent c3e3385 commit 10495ca4d0e63fb8493bd43c462462f390d1aa9b Dennis Bruenig committed Dec 20, 2011
@@ -1,9 +1,12 @@
-<?php if ($_COOKIE['ui-switch'] == 'simple'): ?>
-<?php else: ?>
-<div class="file-description">
+<?php
+ if ($_COOKIE['ui-switch'] == 'simple')
+ $simple = true;
+ else $simple = false;
+?>
+<div class="file-description <?php echo $simple?'no-indent':'' ?>">
<img src="<?php echo get_mimetype_icon_url ($file->getMimetype ()) ?>"
- class="mimetype" />
- <p class="filename">
+ class="mimetype <?php echo $simple?'mimetype-simple':''?>" />
+ <p class="filename <?php echo $simple?'small-filename':'' ?>">
<a href="<?php echo $file->getDownloadUrl () ?>">
<?php echo h (truncate_string ($file->file_name, 40)) ?>
</a>
@@ -14,50 +17,79 @@ class="mimetype" />
<p class="has-password"><?php echo ($file->password ? 1 : 0)?></p>
<p class="available-from"><?php echo $file->available_from; ?></p>
<p class="available-until"><?php echo $file->available_until; ?></p>
- <p class="filesize">(<?php echo $file->getReadableFileSize () ?>)</p>
+ <p class="<?php echo $simple?'small-filesize':'filesize' ?>">(<?php echo $file->getReadableFileSize () ?>)</p>
+ <p class="<?php echo $simple?'availability-simple':'availability-hide'?>">
+ <?php
+ echo __r('%from% to %to%', array ('from' =>
+ $file->getAvailableFrom()->toString(option ('localeDateFormat')),
+ 'to' => '<b>'.$file->getAvailableUntil ()->toString (
+ option ('localeDateFormat')).'</b>')
+ );
+ ?>
+ </p>
+ <p class="<?php echo $simple?'filefolder-simple':'filefolder-hide'?>">
+ <?php
+ if (isset($file->folder) && $file->folder != '') {
+ echo __('Folder') .': ';
+ echo a(array(
+ 'href' => $file->getDownloadFolderUrl ($fz_user->id),
+ 'id' => '',
+ 'class' => '',
+ 'title' => __('Open folder contents')),
+ $file->folder);
+ } else {
+ echo __('No folder assigned');
+ }
+ ?>
+ </p>
<p class="deletelink"><?php echo $file->getDownloadUrl()?>/delete</p>
<?php
if (fz_config_get ('app', 'enable_copy_to_clipboard', true)) {
- echo ' <p class="zclip">';
+ if ($simple == true)
+ echo '<p class="zclip-simple">';
+ else
+ echo '<p class="zclip">';
+ $zclipButtonStyle = $simple?'zclip zclip-simple':'awesome blue zclip';
echo a(array(
'href' => $file->getDownloadUrl () . '/copy',
'id' => '',
- 'class' => 'awesome blue zclip',
+ 'class' => $zclipButtonStyle,
'title' => __('Copy download link to clipboard')),
__('Copy to clipboard'));
echo '</p>';
}
?>
- <p class="share">
+ <p class="<?php echo $simple?'share-simple':'share'?>">
<?php
+ $shareButtonStyles = $simple?'share share-simple':'awesome green share';
echo a(array(
'href' => $file->getDownloadUrl () . '/share',
'id' => '',
- 'class' => 'awesome green share',
+ 'class' => $shareButtonStyles,
'title' => __('Share file with others')),
__('Share'));
?>
</p>
</div>
-<div class="file-attributes file-folder">
- <p class="filefolder">
- <?php
- if (isset($file->folder) && $file->folder != '') {
- echo __('Folder') .': ';
- echo a(array(
- 'href' => $file->getDownloadFolderUrl ($fz_user->id),
- 'id' => '',
- 'class' => '',
- 'title' => __('Open folder contents')),
- $file->folder);
- } else {
- echo __('No folder assigned');
- }
- ?>
- </p>
+<?php if (!$simple): ?>
+<div class="file-attributes file-folder <?php echo $simple?'folder-simple':''?>">
+ <p class="filefolder">
+ <?php
+ if (isset($file->folder) && $file->folder != '') {
+ echo __('Folder') .': ';
+ echo a(array(
+ 'href' => $file->getDownloadFolderUrl ($fz_user->id),
+ 'id' => '',
+ 'class' => '',
+ 'title' => __('Open folder contents')),
+ $file->folder);
+ } else {
+ echo __('No folder assigned');
+ }
+ ?>
+ </p>
</div>
-
<div class="file-attributes">
<p class="availability">
<?php
@@ -83,13 +115,14 @@ class="mimetype" />
}
?>
</p>
+<?php endif ?>
<p>
<?php
-
+ $editButtonClass = $simple?'edit edit-simple':'edit';
echo a(array(
'href' => $file->getDownloadUrl () . '/edit',
'id' => '',
- 'class' => 'edit',
+ 'class' => $editButtonClass,
'title' => __('Edit')),
__('Edit'));
@@ -100,4 +133,3 @@ class="mimetype" />
</p>
</div>
</div>
-<?php endif ?>
View
@@ -125,7 +125,8 @@ class="awesome blue large" value="&raquo; <?php echo __('Upload') ?>" />
<section id="uploaded-files">
<ul id="files">
<?php $odd = true; foreach ($files as $file): ?>
- <li class="file <?php echo $odd ? 'odd' : 'even'; $odd = ! $odd ?>"
+ <li class="file <?php echo $odd ? 'odd' : 'even'; $odd = ! $odd ?>
+ <?php echo $_COOKIE['ui-switch'] == 'simple' ? 'simple-file' : ''?>"
id="<?php echo 'file-'.$file->getHash() ?>">
<?php echo partial ('main/_file_row.php', array ('file' => $file)) ?>
</li>
Binary file not shown.
Oops, something went wrong.

0 comments on commit 10495ca

Please sign in to comment.