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 |
|
|
: <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 |
602 |
ahitrov |
% for my $tab_id ( sort { $a cmp $b } keys %{ $toopi } ) { |
17 |
8 |
ahitrov@rambler.ru |
% 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(' | ', @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 |
| <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 |
607 |
ahitrov |
$(document).ready(function() { |
58 |
|
|
$('.width-toggler').on('click', function(ev) { |
59 |
|
|
ev.preventDefault(); |
60 |
|
|
var $col_side = $('#column-side'); |
61 |
|
|
var $col_content = $('#column-content'); |
62 |
|
|
|
63 |
|
|
if ( $col_side.width() < 40 ) { |
64 |
|
|
$col_content.width('65%'); |
65 |
|
|
$col_side.width('35%').children('fieldset').fadeIn(300); |
66 |
|
|
setCookie('<% $cookie_width %>', '0'); |
67 |
|
|
} else { |
68 |
|
|
$col_side.children('fieldset').fadeOut(300, function(){ |
69 |
|
|
$col_side.width('0'); |
70 |
|
|
$col_content.width('100%'); |
71 |
|
|
}); |
72 |
|
|
setCookie('<% $cookie_width %>', '1'); |
73 |
|
|
} |
74 |
|
|
}); |
75 |
|
|
}); |
76 |
|
|
//--> |
77 |
8 |
ahitrov@rambler.ru |
</script> |
78 |
607 |
ahitrov |
<style> |
79 |
|
|
% if ( $content_fullwidth ) { |
80 |
|
|
#column-side { width:0; } |
81 |
|
|
#column-side fieldset { display:none; } |
82 |
|
|
#column-content { width:100%; } |
83 |
|
|
% } else { |
84 |
|
|
#column-side { width:35%; } |
85 |
|
|
#column-content { width:65%; } |
86 |
|
|
% } |
87 |
|
|
</style> |
88 |
|
|
<%once> |
89 |
|
|
|
90 |
|
|
my $cookie_width = 'content_fullwidth'; |
91 |
|
|
|
92 |
|
|
</%once> |
93 |
8 |
ahitrov@rambler.ru |
<%args> |
94 |
|
|
|
95 |
|
|
$style => undef |
96 |
|
|
$title => undef |
97 |
|
|
|
98 |
|
|
</%args> |
99 |
|
|
<%init> |
100 |
|
|
my $pn = $state->project_name(); |
101 |
|
|
my ($pn_name, $pn_domen) = split(/\./, $pn); |
102 |
|
|
|
103 |
|
|
my $toopi = $project->tabs(); |
104 |
|
|
|
105 |
|
|
my $profile = $m->comp('/contenido/components/context.msn', name => 'profile'); |
106 |
607 |
ahitrov |
my $content_fullwidth = $m->comp('/contenido/components/cookies.msn', name => $cookie_width); |
107 |
8 |
ahitrov@rambler.ru |
|
108 |
|
|
</%init> |