Line # Revision Author
1 8 ahitrov@rambler.ru <& "/contenido/components/title.msn", %ARGS &>
2 <table width="100%" cellspacing="10" cellpadding="0" border="0" style="background-color:#445D82;" class="tatop">
3 <tr>
4 <td><b>Редакторский интерфейс\
5 % if( $style ne 'index' ) {
6 :&nbsp; <a href="/contenido/">На главную</a>
7 % }
8 </b></td>
9 <td align="right"><b><a href="/" style="text-decoration:none;"><% $pn_name %><span style="background-color:#efefef;color:#000000;margin:2px;"> <% uc($pn_domen) %> </span></a></b></td>
10 </tr>
11 <tr>
12 <td>
13 % my @TABS = ();
14 % my @plugins = ($state->project, split(/\s+/, $state->plugins));
15 % my %plugins = map { lc($_) => 1 } @plugins;
16 % for my $tab_id (keys(%{ $toopi })) {
17 % my ($b1, $b2) = $tab_id eq $profile ? ('<b>', '</b>') : ('', '');
18 % if ($r->uri() =~ /keywords\.html$/ || ($r->uri =~ /^\/contenido\/(\w+)\//i && exists $plugins{lc($1)} ) ) {
19 % ($b1, $b2) = ('', '');
20 % }
21 % next if $tab_id eq 'admin' && !$user->check_group(1);
22 % push (@TABS, $b1.'<a href="/contenido/?set_context=profile-'.$tab_id.'">'.$toopi->{$tab_id}->{name}.'</a>'.$b2);
23 % }
24 <% join('&nbsp;|&nbsp', @TABS) %>\
25 % for my $plugin ($state->project, split(/\s+/, $state->plugins)) {
26 % my $l_plugin = lc($plugin);
27 % next if $state->{$l_plugin}->{contenido_notab};
28 % my $uri = "$plugin/";
29 452 ahitrov % my $tab_name;
30 % if (exists $state->{$plugin}{tab_name} && $state->{$plugin}{tab_name}) {
31 % $tab_name = $state->{$plugin}{tab_name};
32 % } elsif ($plugin eq $state->project) {
33 % $tab_name = $state->project_name;
34 % } else {
35 % $tab_name = $plugin;
36 8 ahitrov@rambler.ru % }
37 % my ($b1, $b2) = $r->uri =~ /^\/contenido\/(\w+)\//i && lc($1) eq $l_plugin ? ('<b>','</b>') : ('','');
38 452 ahitrov &nbsp;|&nbsp;<a href="/contenido/<% $uri %>"><% $b1.$tab_name.$b2 %></a>
39 8 ahitrov@rambler.ru % }
40 </td>
41 <td align="right">
42 <b>Пользователь:</b> <% $user->name() %> (<% $user->login() %>)
43 </td>
44 </tr>
45 </table>
46
47 <script>
48 <!--
49 function openWin(wUri, wName, wWidth, wHeight, wScroll, wMenu) {
50 var scrollBars = (wScroll!=0) ? 1 : 0;
51 var menuBars = (wMenu) ? 1 : 0;
52 var positionLeft = (screen.width - wWidth)/2;
53 var positionTop = (screen.height - wHeight)/2;
54 var myW = window.open(wUri,wName,'width='+wWidth+',height='+wHeight+',top='+positionTop+',left='+positionLeft+',location=0,menubar='+menuBars+',resizable=0,scrollbars='+scrollBars+',status=0,titlebar=0,toolbar=0,directories=0,hotkeys=0')
55 myW.focus();
56 }
57 -->
58 </script>
59 <%args>
60
61 $style => undef
62 $title => undef
63
64 </%args>
65 <%init>
66 my $pn = $state->project_name();
67 my ($pn_name, $pn_domen) = split(/\./, $pn);
68
69 my $toopi = $project->tabs();
70
71 my $profile = $m->comp('/contenido/components/context.msn', name => 'profile');
72
73 </%init>