Skip to content
Snippets Groups Projects
Commit 93da552b authored by Michaela Brückner's avatar Michaela Brückner :unicorn: Committed by David Siegfried
Browse files

closes #1674

Closes #1674

Merge request studip/studip!1166
parent 28e5aa51
No related branches found
No related tags found
No related merge requests found
......@@ -493,6 +493,7 @@ class FileController extends AuthenticatedController
$file_ref = FileRef::find($file_ref_id);
$filetype = $file_ref->getFileType();
$this->file = $filetype->convertToStandardFile();
$this->icon_shape = $this->file->getIcon(Icon::ROLE_INFO)->getShape();
$this->author = $file_ref->owner->username;
$this->author_fullname = $file_ref->owner->getFullName('no_title');
......
<form action='<?= $controller->url_for('file/suggest_oer/' . $file_ref_id)?>'
class='default' method='POST' data-dialog="reload-on-close">
<?= CSRFProtection::tokenTag() ?>
<div id="file_suggest_oer">
<form action="<?= $controller->link_for('file/suggest_oer/' . $file_ref_id) ?>"
class='default' method='POST' data-dialog="reload-on-close">
<?= CSRFProtection::tokenTag() ?>
<p class="suggestion_text"><?= _('Das Material gefällt Ihnen?') ?></p>
<p class="suggestion_text"><?= _('Schlagen Sie es zum Teilen im OER Campus vor.') ?></p>
<p><?= sprintf(_('Das folgende Material wird %s zur Veröffentlichung im OER Campus vorgeschlagen:'), $author_fullname)?></p>
<p><?= htmlReady($file->getFilename())?></p>
<label for="additional_text">
<span class="">
<?= _("Ihr Vorschlag wird anonym versendet.") ?>
<?= _("Falls gewünscht, können Sie zusätzlich eine Nachricht verfassen:") ?>
</span>
<textarea name = "additional_text"
id = "additional_text"
rows = "3"
></textarea>
</label>
<p><?= _('Schreiben Sie der Autorin/dem Autoren:') ?></p>
<footer data-dialog-button>
<?= Studip\Button::create(_("Material vorschlagen"))?>
</footer>
</form>
<label for="additional_text">
<textarea class = "add_toolbar wysiwyg"
name = "additional_text"
id = "additional_text"
rows = "3"
placeholder = "<?= _('Warum gefällt Ihnen das Material?') ?>"
></textarea>
</label>
<p id="note">
<?= _('Eine Nachricht ist freiwillig. Ihr Vorschlag wird anonym versendet.') ?>
</p>
<div id="oer_file_details">
<div id="preview_container" class="oercampus_editmaterial">
<div class="hgroup">
<label for="oer_logo_uploader">
<article class="contentbox" title="">
<header>
<h1>
<studip-icon shape="<?= $icon_shape ?>"
size="20"
class="text-bottom">
</studip-icon>
<div id="oer_title">
<?= htmlReady(strlen($file->getFilename()) > 45 ? substr($file->getFilename(), 0, 45) . '...' : $file->getFilename()) ?>
</div>
</h1>
</header>
<div id="oer_preview_image">
<?= Icon::create($icon_shape)->asimg(160) ?>
</div>
</article>
</label>
</div>
</div>
<aside id="oer_aside">
<table class="default nohover">
<caption><?= _('Informationen') ?></caption>
<tbody>
<tr>
<td><?= _('Größe') ?></td>
<? $size = $file->getSize() ?>
<td><?= $size !== null ? relSize($file->getSize(), false) : '-' ?></td>
</tr>
<tr>
<td><?= _('Downloads') ?></td>
<td><?= $file->getDownloads() ?></td>
</tr>
<tr>
<td><?= _('Erstellt') ?></td>
<td><?= date('d.m.Y H:i', $file->getMakeDate()) ?></td>
</tr>
<tr>
<td><?= _('Geändert') ?></td>
<td><?= date('d.m.Y H:i', $file->getLastChangeDate()) ?></td>
</tr>
<tr>
<td><?= _('Besitzer/-in') ?></td>
<td>
<? $user_id = $file->getUserId() ?>
<? if ($user_id) : ?>
<a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => get_username($user_id)]) ?>">
<?= htmlReady($file->getUserName()) ?>
</a>
<? else : ?>
<?= htmlReady($file->getUserName()) ?>
<? endif ?>
</td>
</tr>
</tbody>
</table>
</aside>
</div>
<footer data-dialog-button>
<?= Studip\Button::create(_('Teilen vorschlagen'))?>
</footer>
</form>
</div>
......@@ -296,7 +296,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface
URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id),
_('Material für OER Campus vorschlagen'),
Icon::create('oer-campus'),
['data-dialog' => 'reload-on-close;size=auto']
['data-dialog' => 'reload-on-close;size=750x750']
);
}
......
......@@ -229,13 +229,61 @@ div.file_select_possibilities.content_terms_of_use_icons {
}
#file_edit_window, #file_details_window {
#file_edit_window,
#file_details_window,
#oer_file_details {
display: flex;
justify-content: space-between;
align-items: flex-start;
align-content: flex-start;
}
#oer_file_details {
max-width: 555px;
flex-wrap: wrap;
}
#preview_container,
#oer_aside {
width: 270px;
}
#oer_title {
max-height: 34px;
max-width: 225px;
overflow: hidden;
text-overflow: ellipsis;
hyphens: auto;
word-break: break-all;
text-indent: initial;
}
#oer_preview_image {
width: 100%;
display: flex;
height: 170px;
align-items: center;
img {
width: 100%;
}
}
#file_suggest_oer {
margin-top: 2%;
.suggestion_text {
font-size: 2em;
font-weight: 700;
margin-bottom: 0px;
}
#note {
margin: 0 0 30px;
}
}
table.documents tfoot td.sticky {
position: sticky;
......@@ -319,7 +367,7 @@ table.documents {
#file_aside, #folder_aside {
width: calc(30% - 10px);
max-width: calc(30% - 10px);
/* overflow: hidden; */
/* overflow: hidden; */
div.file-icon, div.folder-icon {
img {
......@@ -335,7 +383,8 @@ table.documents {
}
}
#file_management_forms, div#preview_container {
#file_management_forms, div#preview_container:not(.oercampus_editmaterial) {
width: calc(70% - 10px);
max-width: calc(70% - 10px);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment