Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/menu_link_manage.tpl.php
Строк: 293
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <script type="text/javascript">
    var lang_question_suspend = "Are you sure you want to suspend this menu link?";
    var lang_question_activate = "Are you sure you want to activate this menu link?";
    var lang_question_delete = "Are you sure you want to delete this menu link?";
    $(document).ready(function() { 
        $("a[id^='manage_']").click(function(e) { 
            e.preventDefault(); 
            var click_id    = $(this).attr('id'); 
            var click_arr   = click_id.split('_'); 
            var type        = click_arr[1]; 
            var action      = click_arr[2]; 
            if (type == 'menu') { 
                var menu_id     = click_arr[3]; 
            } else { 
                var link_id     = click_arr[3]; 
            } 
 
            if (action == 'suspend') { 
                var answer = confirm(lang_question_suspend); 
            } else if (action == 'activate') { 
                var answer = confirm(lang_question_activate); 
            } else if (action == 'delete') { 
                var answer  = confirm(lang_question_delete); 
            } 
 
            if (answer) { 
                $("input[name='action']").val(action); 
                if (type == 'menu') { 
                    $("input[name='menu_id']").val(menu_id); 
                    $("#manage_menu_form").submit(); 
                } else { 
                    $("input[name='link_id']").val(link_id); 
                    $("#manage_link_form").submit(); 
                } 
            } 
        }); 

        $("a[id^='position_']").click(function(e) { 
            e.preventDefault(); 
            var click_id  = $(this).attr('id'); 
            var split_arr = click_id.split('_'); 
            var direction = split_arr[2]; 
            var position  = split_arr[3]; 
            $("input[name='position']").val(position); 
            $("input[name='direction']").val(direction); 
            $("#positionForm").submit(); 
        });
    });
    </script>    
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('main_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('menu_menu'); ?>
                <?php if ($this->links): ?>
                <form name="positionForm" id="positionForm" method="post" action="<?php echo CURRENT_URL?>">
                    <input name="slug" type="hidden" value="<?php echo $this->slug?>" />
                    <input name="direction" type="hidden" id="position_direction" value="" />
                    <input name="position" type="hidden" id="position_number" value="" />
                    <?php foreach ($this->links as $link): ?>
                    <input name="link_<?php echo $link['link_id']; ?>" type="hidden" value="<?php echo $link['pos']; ?>" />
                    <?php endforeach; ?>
                </form>
                <form name="manage_link_form" id="manage_link_form" method="post" action="<?php echo CURRENT_URL?>">  
                    <input name="action" type="hidden" value="" />  
                    <input name="link_id" type="hidden" value="" />  
                </form>
                <form name="actionsForm" id="actionsForm" method="post" action="<?php echo CURRENT_URL?>">
                <div class="box_menu">
                      <div class="box_menu_left">
                       <select name="action" id="actions_top"> 
                        <option value="suspend">Suspend</option> 
                        <option value="activate">Activate</option> 
                        <option value="delete">Delete</option> 
                        </select> 
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                    </div>
                    <div class="clear"></div>                  
                </div>
                <table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
                    <thead>
                          <tr>
                              <th class="nosort" style="width: 12px; text-align: center;"><input name="checkbox_all" type="checkbox" id="check_all" /></th>
                            <th><h3>Name</h3></th>
                            <th><h3>Menu</h3></th>
                            <th><h3>Title</h3></th>
                            <th><h3>Link</h3></th>
                            <th><h3>Type</h3></th>
                            <th><h3>Positon</h3></th>
                            <th><h3>Status</h3></th>
                            <th><h3>Actions</h3></th>
                        </tr>
                    </thead>
                    <tbody>
                          <?php
                          $count 
count($this->links);
                          foreach (
$this->links as $link):
                          if (
$link['status'] == '1'):
                              
$status_image 'accept.png';
                            
$status 'suspend';
                        else:
                            
$status_image 'cancel.png';
                            
$status 'activate';
                        endif; 
?>
                        <tr id="row_<?php echo $link['link_id']; ?>">
                              <td><input name="checkbox_link_<?php echo $link['link_id']; ?>" type="checkbox" id="checkbox_item_<?php echo $link['link_id']; ?>" /></td>
                            <td><?php echo e($link['name']); ?></td>
                            <td><?php echo e($link['menu']); ?></td>
                            <td><?php echo e($link['title']); ?></td>
                            <td><?php echo e($link['link']); ?></td>
                            <td><?php if ($link['type'] == 'ext'): echo 'External'; else: echo 'Internal'; endif; ?></td>
                            <td>
                                  <?php if ($link['pos'] > 1): ?><a href="#up" id="position_menu_up_<?php echo $link['pos']; ?>"><img src="<?php echo TPL_REL?>/images/arrow_up.png" alt="Move Up" /></a><?php endif; ?>
                                <?php echo $link['pos']; ?>
                                <?php if ($link['pos'] < $count): ?><a href="#down" id="position_menu_down_<?php echo $link['pos']; ?>"><img src="<?php echo TPL_REL?>/images/arrow_down.png" alt="Move Down" /></a><?php endif; ?>
                            </td>
                            <td><a href="#status" id="manage_link_<?php echo $status?>_<?php echo $link['link_id']; ?>" title="Click to <?php if ($link['status'] == '1'): echo 'suspend'; else: 'activate'; endif; ?> this link!"><img src="<?php echo TPL_REL?>/images/<?php echo $status_image?>" /></a></td>
                            <td>
                                <a href="<?php echo ADMIN_URL?>/index.php?q=menu/link_edit&amp;id=<?php echo $link['link_id']; ?>" id="edit_menu_<?php echo $link['link_id']; ?>"><img src="<?php echo TPL_REL?>/images/link_edit.png" alt="Edit" /></a>&nbsp;
                                <a href="#delete" id="manage_link_delete_<?php echo $link['link_id']; ?>" title="Click to delete this link!"><img src="<?php echo TPL_REL?>/images/link_delete.png" alt="Delete" /></a>
                            </td>
                        </tr>
                          <?php endforeach; ?>
                    <tbody>
                    </tbody>
                </table>
                <div class="box_menu">
                      <div class="box_menu_left">
                       <select name="action" id="actions_bottom"> 
                        <option value="suspend">Suspend</option> 
                        <option value="activate">Activate</option> 
                        <option value="delete">Delete</option> 
                        </select> 
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                    </div>
                    <div class="clear"></div>                  
                </div>
                </form>
                <?php else: ?>
                <div class="none">This menu has no links yet!</div>
                <?php endif; ?>
            </div>
               <div class="legend">
                    <img src="<?php echo TPL_REL?>/images/link.png" alt="link_view" /> View Menu Items &nbsp;
                    <img src="<?php echo TPL_REL?>/images/link_edit.png" alt="link_edit" /> Edit Link &nbsp;
                    <img src="<?php echo TPL_REL?>/images/link_delete.png" alt="link_delete" /> Delete Link &nbsp;
                    <img src="<?php echo TPL_REL?>/images/accept.png" alt="accept" /> Active - Action Suspend &nbsp;
                    <img src="<?php echo TPL_REL?>/images/cancel.png" alt="cancel" /> Suspended - Action Activate
                </div>
        </div>
    </div>
Онлайн: 1
Реклама