%#============================================================================ %# ePortal - WEB Based daily organizer %# Author - S.Rusakov %# %# Copyright (c) 2001 Sergey Rusakov. All rights reserved. %# This program is free software; you can redistribute it %# and/or modify it under the same terms as Perl itself. %# %# $Revision: 3.1 $ %# $Date: 2003/04/24 05:36:51 $ %# $Header: /home/cvsroot/ePortal/comp_root/map.htm,v 3.1 2003/04/24 05:36:51 ras Exp $ %# %#---------------------------------------------------------------------------- %# Parameters: %# menu=id expand only this menu %# %# %# link text onClink=expand_tree('TR01_###') %# %# %# 1 - is level %# ### is ID of the object %# %#============================================================================ % if ( $ePortal->sysacl_check("menu", "w") ) { <% plink({rus => "Создать меню", eng => "Create menu"}, href => "/admin/menu_edit.htm") %> <% plink({rus => "Создать раздел", eng => "Create submenu"}, href => "/admin/msect_edit.htm") %> <% plink({rus => "Создать ссылку", eng => "Create a link"}, href => "/admin/mlink_edit.htm") %> <% plink({rus => "Экспорт", eng => "Export"}, href => href("/export/export.htm", objtype => 'ePortal::Menu')) %>
% } <% pick_lang(rus => q{ Здесь представлена карта нашего сервера в виде дерева доступных вам ресурсов. Для "раскрытия" или "закрытия" отдельных ветвей дерева используйте символы }, eng => q{ Here you see a map of our site. To expand or collapse a branch use }) %> <% img( src => "/images/ePortal/plus.gif", alt => pick_lang(rus => "раскрыть", eng=>"expand") ) %>  <% pick_lang(rus =>"и", eng =>"and") %>  <% img( src => "/images/ePortal/minus.gif", alt=> pick_lang(rus => "закрыть", eng => "collapse") ) %>

<% empty_td( width=> 5) %> <% empty_td( width=> 5) %> <% empty_td( width=> 5) %> <% empty_td( width=> 5) %> <% empty_td( width=> 5) %> <% empty_td( width=> 5) %>
<% pick_lang(rus => "Карта сервера", eng => "Server's map") %>   <% img( src => "/images/ePortal/plus.gif", title => pick_lang(rus => "Раскрыть все", eng => "Expand all"), href => "javascript:expand_tree('all', 1);") %>  <% img( src => "/images/ePortal/minus.gif", title => pick_lang(rus => "Свернуть все", eng => "Collapse all"), href => "javascript:expand_tree('all', 0);") %> <% pick_lang(rus => "Самое популярное", eng => "Most popular") %>
<% $T->draw %><& SELF:draw_popular &>
%#=== @metags draw_popular ==================================================== <%method draw_popular><%perl> my $ml = new ePortal::MenuLink::View01; $ml->restore_all(); % my $count; % while($ml->restore_next) { % last if $ml->clicks <= 1 or $count++ > 10; <% $ml->htmlLink() %>  (<% $ml->clicks %>)
% }
<% pick_lang( rus => "В скобках указано количество посещений данного ресурса", eng => "Link click count shown in parenthesis") %> %#=== @METAGS onStartRequest ==================================================== <%method onStartRequest><%perl> if ($ARGS{menu}) { my $m = new ePortal::Menu; if ($m->restore($ARGS{menu})) { $ARGS{menu} = $m->id; } else { delete $ARGS{menu}; } } $T = new ePortal::HTML::Tree(); $T->class("smallbold"); $T->class("A_black", 1); $T->class("A_black", 2); { my $menu = new ePortal::Menu; $menu->restore_all; while($menu->restore_next) { my %params = (); $params{button_edit} = 1, $params{button_delete} = 1 if $menu->acl_check("w"); $params{button_access} = 1 if $menu->acl_check("a"); $T->load_item($menu, %params); my $section = $menu->children; while($section->restore_next) { $T->load_item($section, %params, parent => $menu->id); my $link = $section->children; $T->load_items($link, %params, field_parent => "section_id", url => '/go.htm?id=#id#'); } } } if ($ARGS{menu}) { $T->expand_item($ARGS{menu},1); } else { $T->expand_level(2); } %#=== @metags attr ========================================================= <%attr> Title => { rus => "Карта сервера", eng => "Site map"} <%once> our $T;