Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

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

<!-- $Id: manufacturer.tpl 124 2023-07-22 21:00:48Z lars $ BEGIN -->
<script>
    $(function () {
        $('#alle').button().click(function() {
            $('.gesperrte_hersteller').prop("checked",true);
        })
        $('#keine').button().click(function() {
            $('.gesperrte_hersteller').prop("checked",false);
        })
        $('#umkehren').button().click(function() {
            $('.gesperrte_hersteller').each(function(){
                $(this).prop("checked",!$(this).prop("checked"));
            });
        })
    })
</script>
<form id="manufacturerForm" method="post">
    {if $zeile.id}
        <input type="hidden" name="_method" value="PATCH">
        <input type="hidden" id="ID" value="{$zeile.id}"/>
    {/if}
    <input type="hidden" name="_token" value="{csrf_token()}">
    <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
        <tr>
            <td colspan="2" class="links">Hersteller: {if $zeile.id}Bearbeiten{else}Neueintrag{/if}</td>
        </tr>
        {$Feld="headline"}
        {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ][ $Feld ] ) )}
            <tr>
                <td class="links" width="20%">
                    <b>{$web_rechte[ "online_shop" ][ "hersteller" ][ $Feld ]|default:"$Feld"}</b>
                </td>
                <td class="rechts">
                    <input type="text" name="{$Feld}" size="40" value="{{$zeile[$Feld]|htmlentities:$smarty.const.ENT_COMPAT:$smarty.session["charset"]}}" maxlength="255"/>
                </td>
            </tr>
        {/if}
        {$Feld="Name"}
        {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ][ $Feld ] ) )}
            <tr>
                <td class="links" width="20%">
                    <b>{$web_rechte[ "online_shop" ][ "hersteller" ][ $Feld ]|default:"$Feld"}</b>
                </td>
                <td class="rechts">
                    <input type="text" name="name" size="40" value="{$zeile["name"]|htmlentities:$smarty.const.ENT_COMPAT:$smarty.session["charset"]}" maxlength="255"/>
                </td>
            </tr>
        {/if}
        {if $sub}
            <tr>
                <td class="links" width="20%"><b>Aliase</b></td>
                <td class="rechts">
                    <a id="add_hs">Herstelleralias anlegen</a>
                    <br/>
                    <div id="show_hersteller_alias">
                        {include file="herstelleraliase.tpl"}
                    </div>
                </td>
            </tr>

        {/if}
        {$Feld = "Text"}
        {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ][ $Feld ] ) )}
            <tr>
                <td class="links" width="20%">
                    <b><label for="{$Feld}">{$web_rechte[ "online_shop" ][ "hersteller" ][ $Feld ]|default:"$Feld"}</label></b>
                </td>
                <td class="rechts">
                    <textarea name="description" id="{$Feld}" cols="50" rows="4">{$zeile["description"]}</textarea>
                </td>
            </tr>
        {/if}
        {$Feld = "Text2"}
        {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ][ $Feld ] ) )}
            <tr>
                <td class="links" width="20%">
                    <b><label for="{$Feld}">{$web_rechte[ "online_shop" ][ "hersteller" ][ $Feld ]|default:"$Feld"}</label></b>
                </td>
                <td class="rechts">
                    <textarea name="{$Feld}" id="{$Feld}" cols="50" rows="4">{$zeile[$Feld]}</textarea>
                </td>
            </tr>
        {/if}
        {$Feld = "Text3"}
        {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ][ $Feld ] ) )}
            <tr>
                <td class="links" width="20%">
                    <b><label for="{$Feld}">{$web_rechte[ "online_shop" ][ "hersteller" ][ $Feld ]|default:"$Feld"}</label></b>
                </td>
                <td class="rechts">
                    <textarea name="{$Feld}" id="{$Feld}" cols="50" rows="4">{$zeile[$Feld]}</textarea>
                </td>
            </tr>
        {/if}
        {*for $bild_nr = 1; $bild_nr <= 2; $bild_nr++}
            {$Feld="Logo$bild_nr"}
            {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ][ $Feld ] ) )}
                <tr>
                    <td class="links" width="20%">
                        {$name=$web_rechte[ "online_shop" ][ "hersteller" ][ $Feld ]}
                        {$name=";"|explode:$name}
                        {$name=$name[0]}
                        <b><label for="{$Feld}">{$name|default:"$Feld"}</label></b>
                    </td>
                    <td class="rechts">
                        <table>
                            <tr>
                                <td>
                                    {$pfadExtra="/images/manufacturer/$bild_nr/"}
                                    <input type="hidden" name="{$Feld}_Pfad" value="{$webs.verzeichnis}{$pfadExtra}">
                                    {if $zeile[$Feld]}
                                        <input type="radio" name="_{$Feld}" value="0" id="{$Feld}_0" checked="checked">
                                        <label for="{$Feld}_0"><a href="{$domain}{$pfadExtra}/{$zeile[$Feld]}" target="_blank">{$zeile[$Feld]}</a>
                                            {$zeile.size[$bild_nr]|fsize_format:"":2:",":"."}
                                            ({$zeile.imgsize[$bild_nr][0]} x {$zeile.imgsize[$bild_nr][1]} Pixel)</label>
                                        <br>
                                    {/if}
                                    <input type="radio" name="_{$Feld}" value="1" {if !$zeile[$Feld]}checked="checked"{/if} id="{$Feld}_1"><label for="{$Feld}_1">kein Bild</label><br>
                                    <input type="radio" name="_{$Feld}" value="2" id="{$Feld}_2"><input type="file" name="{$Feld}" onfocus="$('#{$Feld}_2').prop('checked',true)">
                                </td>
                                <td width="45%" nowrap align="center">
                                    {if ( $zeile[ $Feld ] != "" )}
                                        <a href="{$domain}{$pfadExtra}{$zeile[ $Feld ]}" target="_blank"><img src="{$domain}{$pfadExtra}{$zeile[ $Feld ]}" border="0"/></a>
                                    {/if}
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                {$extra="_href"}
                {$Feld2="$Feld$extra"}
                {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ][ $Feld2 ] ) )}
                    <tr>
                        <td class="links" width="20%"><b><label for="{$Feld2}">{$web_rechte[ "online_shop" ][ "hersteller" ][ $Feld2 ]|default:"$Feld-Link"}</label> </b></td>
                        <td class="rechts">
                            <input type="text" name="{$Feld2}" id="{$Feld2}" size="40" value="{$zeile[ $Feld2 ]}" maxlength="255"/>
                        </td>
                    </tr>
                {/if}
            {/if}
        {/for*}
        {for $i=1;$i<=10;$i++}
            {$Feld="Eigenschaft_$i"}
            {if isset($web_rechte[ "online_shop" ][ "hersteller" ][strtolower($Feld)])}
                <tr>
                    <td class="links" width="20%">
                        <b><label for="{$Feld}">{$web_rechte[ "online_shop" ][ "hersteller" ][ strtolower($Feld) ]|default:"$Feld"}</label></b>
                    </td>
                    <td class="rechts">
                        <input type="hidden" name="property_{$i}" value="0"/>
                        <input type="checkbox" name="property_{$i}" id="{$Feld}" value="1" {if ( $zeile[ "property_$i" ] == 1 )}checked="checked"{/if}/>
                    </td>
                </tr>
            {/if}
        {/for}
        {*assign var=Feld value="meta_daten"}
        {if ( isset( $user_rechte["online_shop"]['directory'][$Feld] ) )}
            {include file="google_seo.tpl"}
            <tr>
                <td class="links" valign="top"><b>Meta-Robots:</b></td>
                <td class="rechts">
                    {html_options name="meta_robots" options=$meta_robots selected=$zeile.meta.meta_robots.meta_content}
                </td>
            </tr>
        {/if*}
        {assign var=Feld value="abwKalkulation"}
        {if ( isset( $user_rechte["online_shop"]["hersteller"][$Feld] ) )}
            <tr>
                <td class="links"><b>abweichende Preiskalkulation</b></td>
                <td class="rechts">
                    <input type="hidden" name="calculation" value="0"/>
                    <input type="checkbox" name="calculation" value="1" {if ( $zeile[ "calculation" ] == 1 )}checked="checked"{/if} />
                    {*if $zeile.calculation}
                        {include file="../toolbox/templates/common/edit_preiskalkulation.tpl"}
                    {/if*}
                </td>
            </tr>
        {/if}
        {if isset($zeile.hstatus)}
            <tr>
                <td class="links" width="20%"><b>Status:</b></td>
                <td class="rechts">
                    <input type="hidden" name="hstatus" value="0"/>
                    <select name="hstatus">
                        <option value="0" {if ( $zeile['hstatus'] == 0 )}selected='selected'{/if}>freigegeben</option>
                        <option value="1" {if ( $zeile['hstatus'] == 1 )}selected='selected'{/if}>verborgen</option>
                        <option value="2" {if ( $zeile['hstatus'] == 2 )}selected='selected'{/if}>gesperrt</option>
                    </select>
                </td>
            </tr>
        {/if}
        {if ( isset( $user_rechte[ "online_shop" ][ "hersteller" ]["herstellersperren"] ) ) && $zeile.id}
            <tr>
                <td class="links">gesperrte Hersteller</td>
                <td>
                    <table class="keinRand">
                        <tr>
                            <th>Preisagentur</th>
                            <th>sperren?
                                <br>
                                <a id="alle">alle</a>&nbsp;<a id="keine">keine</a>&nbsp;<a id="umkehren">umkehren</a>
                            </th>
                        </tr>
                        {foreach $preisagenturen as $pa}
                            <tr class="{cycle values=",gerade"}">
                                <td><label for="pa_{$pa.id}">{$pa.titel}</label></td>
                                <td>
                                    <input type="hidden" name="gesperrte_hersteller[{$pa.id}]" value="0">
                                    <input class="gesperrte_hersteller" type="checkbox" name="gesperrte_hersteller[{$pa.id}]" value="1" id="pa_{$pa.id}" {if in_array($zeile.ID,$pa.gesperrte_hersteller)}checked="checked"{/if}>
                                </td>
                            </tr>
                        {/foreach}
                    </table>
                </td>
            </tr>
        {/if}
        {if $zeile.id}
            <tr>
                <td class="links" width="20%"><b>erstellt:</b></td>
                <td class="rechts">am: {$zeile.created_at|date_format:"%x"} um: {$zeile.created_at|date_format:"%X"} Uhr von: {$zeile["created_by"]}</td>
            </tr>
            <tr>
                <td class="links" width="20%"><b>letzte&nbsp;Änderung:</b></td>
                <td class="rechts">am: {$zeile.update_at|date_format:"%x"} um: {$zeile.updated_at|date_format:"%X"} Uhr von: {$zeile["updated_by"]}</td>
            </tr>
        {/if}
    </table>
</form>
<!-- $Id: manufacturer.tpl 124 2023-07-22 21:00:48Z lars $ END -->