Subversion-Projekte lars-tiefland.ci

Revision

Revision 2223 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<!-- $Id: medien.tpl 2230 2017-12-23 22:50:07Z lars $ BEGIN -->
<script type="text/javascript" src="/backend/js/bildverwaltung.js"></script>
<style>
.tb_bv_button
{
  height: 22px;
  width: 30px;
}
</style>
<script>
    $('.aehnlich').change(change_aehnlich);
    $('.del_image').css("cursor","pointer").click(del_image);
    $('.pic_up').css("cursor","pointer").click(move_pic);
    $('.pic_down').css("cursor","pointer").click(move_pic);
    $('.edit_desc').button({
        icons:{
            primary:"ui-icon-pencil"
        }
    }).css("cursor","pointer").click(edit_medium_desc);
    $('.edit_type').button({
        icons:{
            primary:"ui-icon-pencil"
        }
    }).css("cursor","pointer").click(edit_medium_type);
    $('#edit_desc_dlg').dialog({
        autoOpen:false,
        modal:true,
        resizable:false,
        buttons:{
            "speichern": function()
            {
                url="/backend/medien/edit_desc";
                $.post(url,$('#edit_desc_form').serializeArray(),function(html){
                    $('#desc_'+$('#hidden_id').val()).html(html);
                })
                $(this).dialog("close");
            },
            "abbrechen": function()
            {
                $(this).dialog("close");
            }
        }
    });
    $('#edit_type_dlg').dialog({
        autoOpen:false,
        modal:true,
        resizable:false,
        buttons:{
            "speichern": function()
            {
                url="/backend/medien/edit_type";
                $.post(url,$('#edit_type_form').serializeArray(),function(html){
                    $('#type_'+$('#hidden_id_type').val()).html(html);
                })
                $(this).dialog("close");
            },
            "abbrechen": function()
            {
                $(this).dialog("close");
            }
        }
    });
</script>
<table style="width:100%">
    <tr class="links">
        <th>Dateiname</th>
        <th>Vorschau</th>
        <th>&auml;hnlich?</th>
        <th>Beschreibung</th>
        <th>Gr&ouml;&szlig;e</th>
        <th>Type</th>
        <th>Aktionen</th>
    </tr>
    {foreach $medien as $medium}
    <tr>
        <td id="bild_name_{$medium.id}">{$medium.name}</td>
        <td>
            {if $medium.typ==1||$medium.typ==5||$medium.typ==6||$medium.typ==7}
            <a href="{$medium.bild_url}" target="_blank"><img src="{$medium.bild_url_mini}" /></a>
            {elseif $medium.typ==3}
            <a href="{$medium.name}" target="_blank">
                <img src="{$medium.bild_url_mini}" width="153" />
            </a>
            {else}
            Dies ist kein Bild!<br/>Daher gibt es keine Vorschau!
            {/if}
        </td>
        <td>
            <select id="aehnlich_{$smarty.get.l_id}_{$medium.id}_{$l_type}" class="aehnlich">
            {html_options selected=$medium.aehnlich options=$aehnlich}
            </select>
        </td>
        <td style="width:200px;">
            <div>
                <div style="float:left;">
                    <a class="edit_desc" id="edit_desc__{$medium.id}" title="Beschreibung editieren"></a>
                </div>
                <div style="float:left;" id="desc_{$medium.id}">{$medium.beschreibung|default:"&nbsp;"}</div>
            </div>
        </td>
        <td>
            {$medium.size|fsize_format}
            {if $medium.typ==1||$medium.typ==5||$medium.typ==6||$medium.typ==3}
            ({$medium.img_size[0]} x {$medium.img_size[1]} Pixel)
            {/if}
        </td>
        <td>
            <div>
                <div style="float:left">
                    <a class="edit_type" id="edit_type__{$medium.id}" title="Typ editieren"></a>
                </div>
                <div style="float:left" id="type_{$medium.id}">{$medium.typ_name}</div>
            </div>
        </td>
        <td>
            <table>
                <tr>
                    <td style="width:16px">
                        {if !$medium@first}
                        <a class="pic_up" title="nach oben" id="up_{$l_id}_{$medium.id}_{$l_type}"><img src="/backend/images/Icons/up.png"/></a>
                        {/if}
                    </td>
                    <td style="width:16px">
                        {if !$medium@last}
                        <a class="pic_down" title="nach unten" id="down_{$l_id}_{$medium.id}_{$l_type}"><img src="/backend/images/Icons/down.png"/></a>
                        {/if}
                    </td>
                    <td style="width:16px">
                        <a title="l&ouml;schen" class="del_image" id="del_image_{$medium.id}_{$l_id}"><img src="/backend/images/Icons/trashcan.png"/></a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    {/foreach}
    {if $artikelId}
    <input type="hidden" id="artikel_id" value="{$artikelId}" />
    {elseif $dirId}
    <input type="hidden" id="directory_id" value="{$dirId}" />
    {/if}
    <input type="hidden" id="l_type" value="{$l_type}" />
</table>
<br />
<input type="button" value="neues Bild zuordnen" id="add_image"/>
<input type="button" value="Bilder hochladen" id="upload_images"/>
<input type="button" value="Youtube-Video zuordnen" id="youtube" />
<div id="add_image_dialog" title="Bild hinzuf&uuml;gen"></div>
<!-- $Id: medien.tpl 2230 2017-12-23 22:50:07Z lars $ END -->