Skip to content

Commit

Permalink
translation, mini-view
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Bruenig committed Dec 20, 2011
1 parent c3e3385 commit 10495ca
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 136 deletions.
92 changes: 62 additions & 30 deletions app/views/main/_file_row.php
@@ -1,9 +1,12 @@
<?php if ($_COOKIE['ui-switch'] == 'simple'): ?> <?php
<?php else: ?> if ($_COOKIE['ui-switch'] == 'simple')
<div class="file-description"> $simple = true;
else $simple = false;
?>
<div class="file-description <?php echo $simple?'no-indent':'' ?>">
<img src="<?php echo get_mimetype_icon_url ($file->getMimetype ()) ?>" <img src="<?php echo get_mimetype_icon_url ($file->getMimetype ()) ?>"
class="mimetype" /> class="mimetype <?php echo $simple?'mimetype-simple':''?>" />
<p class="filename"> <p class="filename <?php echo $simple?'small-filename':'' ?>">
<a href="<?php echo $file->getDownloadUrl () ?>"> <a href="<?php echo $file->getDownloadUrl () ?>">
<?php echo h (truncate_string ($file->file_name, 40)) ?> <?php echo h (truncate_string ($file->file_name, 40)) ?>
</a> </a>
Expand All @@ -14,50 +17,79 @@ class="mimetype" />
<p class="has-password"><?php echo ($file->password ? 1 : 0)?></p> <p class="has-password"><?php echo ($file->password ? 1 : 0)?></p>
<p class="available-from"><?php echo $file->available_from; ?></p> <p class="available-from"><?php echo $file->available_from; ?></p>
<p class="available-until"><?php echo $file->available_until; ?></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> <p class="deletelink"><?php echo $file->getDownloadUrl()?>/delete</p>
<?php <?php
if (fz_config_get ('app', 'enable_copy_to_clipboard', true)) { 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( echo a(array(
'href' => $file->getDownloadUrl () . '/copy', 'href' => $file->getDownloadUrl () . '/copy',
'id' => '', 'id' => '',
'class' => 'awesome blue zclip', 'class' => $zclipButtonStyle,
'title' => __('Copy download link to clipboard')), 'title' => __('Copy download link to clipboard')),
__('Copy to clipboard')); __('Copy to clipboard'));
echo '</p>'; echo '</p>';
} }
?> ?>
<p class="share"> <p class="<?php echo $simple?'share-simple':'share'?>">
<?php <?php
$shareButtonStyles = $simple?'share share-simple':'awesome green share';
echo a(array( echo a(array(
'href' => $file->getDownloadUrl () . '/share', 'href' => $file->getDownloadUrl () . '/share',
'id' => '', 'id' => '',
'class' => 'awesome green share', 'class' => $shareButtonStyles,
'title' => __('Share file with others')), 'title' => __('Share file with others')),
__('Share')); __('Share'));
?> ?>
</p> </p>
</div> </div>


<div class="file-attributes file-folder"> <?php if (!$simple): ?>
<p class="filefolder"> <div class="file-attributes file-folder <?php echo $simple?'folder-simple':''?>">
<?php <p class="filefolder">
if (isset($file->folder) && $file->folder != '') { <?php
echo __('Folder') .': '; if (isset($file->folder) && $file->folder != '') {
echo a(array( echo __('Folder') .': ';
'href' => $file->getDownloadFolderUrl ($fz_user->id), echo a(array(
'id' => '', 'href' => $file->getDownloadFolderUrl ($fz_user->id),
'class' => '', 'id' => '',
'title' => __('Open folder contents')), 'class' => '',
$file->folder); 'title' => __('Open folder contents')),
} else { $file->folder);
echo __('No folder assigned'); } else {
} echo __('No folder assigned');
?> }
</p> ?>
</p>
</div> </div>

<div class="file-attributes"> <div class="file-attributes">
<p class="availability"> <p class="availability">
<?php <?php
Expand All @@ -83,13 +115,14 @@ class="mimetype" />
} }
?> ?>
</p> </p>
<?php endif ?>
<p> <p>
<?php <?php

$editButtonClass = $simple?'edit edit-simple':'edit';
echo a(array( echo a(array(
'href' => $file->getDownloadUrl () . '/edit', 'href' => $file->getDownloadUrl () . '/edit',
'id' => '', 'id' => '',
'class' => 'edit', 'class' => $editButtonClass,
'title' => __('Edit')), 'title' => __('Edit')),
__('Edit')); __('Edit'));


Expand All @@ -100,4 +133,3 @@ class="mimetype" />
</p> </p>
</div> </div>
</div> </div>
<?php endif ?>
3 changes: 2 additions & 1 deletion app/views/main/index.php
Expand Up @@ -125,7 +125,8 @@ class="awesome blue large" value="&raquo; <?php echo __('Upload') ?>" />
<section id="uploaded-files"> <section id="uploaded-files">
<ul id="files"> <ul id="files">
<?php $odd = true; foreach ($files as $file): ?> <?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() ?>"> id="<?php echo 'file-'.$file->getHash() ?>">
<?php echo partial ('main/_file_row.php', array ('file' => $file)) ?> <?php echo partial ('main/_file_row.php', array ('file' => $file)) ?>
</li> </li>
Expand Down
Binary file modified i18n/de/LC_MESSAGES/default.mo
Binary file not shown.

0 comments on commit 10495ca

Please sign in to comment.