# HG changeset patch # User sergey # Date 1400510056 -14400 # Node ID d997ff96acf10ab73574e161f8a0114e96d53854 # Parent a9ce584a7f3bf115af43471532cca1c59efcece3 sync diff -r a9ce584a7f3b -r d997ff96acf1 dox_task.pl --- a/dox_task.pl Mon May 19 04:34:28 2014 +0400 +++ b/dox_task.pl Mon May 19 18:34:16 2014 +0400 @@ -3,18 +3,74 @@ use config; use config::bootstrap; use strict; -use IMPL::Config; +use URI; + use IMPL::require { DoxygenTask => 'Benzin::Doxygen::MakedocTask', - DoxModel => 'Benzin::Doxygen::Model', - InlineFactory => 'IMPL::Object::InlineFactory' + HG => 'Benzin::SCC::Mercurial', + Config => 'IMPL::Config' }; -my $task = DoxygenTask->new( - %config::doxSource +my @repos = ( + { + doxyfile => '_doc/doxyfile', + src => 'https://hg.implab.org/pub/ImplabNet' + }, + { + doxyfile => 'Doc/doxyfile', + src => 'https://hg.implab.org/private/Pallada.PoiskAvia' + } ); -$task->DoWork(); +my $base = Config->AppDir('mercurial-data'); + +foreach my $desc (@repos) { + my $name = pop (@{[split /\//, $desc->{src}]}); + print "processing: $name\n"; + my $dir = File::Spec->catdir($base,$name); + my $update; + if (-d $dir) { + + my $repo = HG->new($dir,\%config::hgSettings); + my $income = $repo->Income(); + if (@$income) { + print "donwloading changes\n"; + $repo->Pull(['-u']); + $update = 1; + } + } else { + print "clonning $name to $dir\n"; + my $repo = HG->Clone($desc->{src},$dir,[],\%config::hgSettings); + $update = 1; + } + + if ($update) { + print "updating $name"; + my $task = DoxygenTask->new( + doxyfile => File::Spec->catdir($dir,$desc->{doxyfile}), + makedoc => 1, + dataDirPath => Config->AppDir('doxygen-data', $name), + connection => $config::doxConnection + ); + + $task->DoWork(); + } else { + print "$name is up to date\n"; + } +} + +#xmlDocPath => '/home/sergey/projects/Dusel/_doc/xml', +# collectionName => 'dusel', +# doxyfile => '/home/sergey/projects/Dusel/_doc/doxyfile', +# dataDirPath => File::Spec->catdir($base,'doxygen-data','dusel'), +# connection => $doxConnection, +# language => 'csharp' + +#my $task = DoxygenTask->new( +# %config::doxSource +#); + +#$task->DoWork(); print "completed\n"; \ No newline at end of file diff -r a9ce584a7f3b -r d997ff96acf1 shared_view/errors/403.tt --- a/shared_view/errors/403.tt Mon May 19 04:34:28 2014 +0400 +++ b/shared_view/errors/403.tt Mon May 19 18:34:16 2014 +0400 @@ -1,3 +1,4 @@ +[% document.layout = 'simple' %] forbidden
 $model
diff -r a9ce584a7f3b -r d997ff96acf1 shared_view/errors/404.tt
--- a/shared_view/errors/404.tt	Mon May 19 04:34:28 2014 +0400
+++ b/shared_view/errors/404.tt	Mon May 19 18:34:16 2014 +0400
@@ -1,3 +1,4 @@
+[% document.layout = 'simple' %]
 Ресурс не найден
 
 $model
diff -r a9ce584a7f3b -r d997ff96acf1 shared_view/errors/500.tt
--- a/shared_view/errors/500.tt	Mon May 19 04:34:28 2014 +0400
+++ b/shared_view/errors/500.tt	Mon May 19 18:34:16 2014 +0400
@@ -1,3 +1,4 @@
+[% document.layout = 'simple' %]
 exception
 
 $model
diff -r a9ce584a7f3b -r d997ff96acf1 tests/test_scc.pl
--- a/tests/test_scc.pl	Mon May 19 04:34:28 2014 +0400
+++ b/tests/test_scc.pl	Mon May 19 18:34:16 2014 +0400
@@ -15,10 +15,16 @@
 	\%config::hgSettings
 );
 
-foreach my $info (@{$repo->Income() || []}) {
-	print "$info->{number} : $info->{hash}\n";
-}
+$repo->name('ImplabNet');
+$repo->SaveConfig();
+
+print "repo: ", $repo->hgrc->val('paths','default')," name: " ,$repo->name, "\n";
 
 $repo->Pull('-u', '-r' => 20);
 
+print "LISTING\n";
+print "repo: ",$_->path, " " , $_->hgrc->val('paths','default','local'), "\n"
+	foreach @{HG->ListRepos('/tmp')};
+
+
 print "done\n";
\ No newline at end of file
diff -r a9ce584a7f3b -r d997ff96acf1 view/globals.tt
--- a/view/globals.tt	Mon May 19 04:34:28 2014 +0400
+++ b/view/globals.tt	Mon May 19 18:34:16 2014 +0400
@@ -1,3 +1,4 @@
 [%
 	css = app.location.static.css.SetView('css');
+	adminRole = security.aliases.adminRole;
 %]
\ No newline at end of file
diff -r a9ce584a7f3b -r d997ff96acf1 view/layout/default/base.tt
--- a/view/layout/default/base.tt	Mon May 19 04:34:28 2014 +0400
+++ b/view/layout/default/base.tt	Mon May 19 18:34:16 2014 +0400
@@ -18,18 +18,7 @@
 			id = 'main-menu'
 	)%]
 	[%
-		IF user.isNobody;
-			usermenu = [
-				{ title = 'Login', href= app.location.user.login(ref = location) }
-			];
-		ELSE;
-			usermenu = [
-				{ title = user.name },
-				{ title = 'Settings', href = app.location.user },
-				{ title = 'Logout', href = app.location.user.logout }
-			];
-		END;
-		render('menu', items = usermenu, class = 'menu-bar float-right', id = 'user-menu');
+		render('usermenu');
 	%]
 	
diff -r a9ce584a7f3b -r d997ff96acf1 view/layout/default/index.tt --- a/view/layout/default/index.tt Mon May 19 04:34:28 2014 +0400 +++ b/view/layout/default/index.tt Mon May 19 18:34:16 2014 +0400 @@ -11,17 +11,6 @@
[% - IF user.isNobody; - usermenu = [ - { title = 'Login', href= app.location.user.login(ref = location) } - ]; - ELSE; - usermenu = [ - { title = user.name }, - { title = 'Settings', href = app.location.user }, - { title = 'Logout', href = app.location.user.logout } - ]; - END; - render('menu', items = usermenu, class = 'menu-bar float-right', id = 'user-menu'); + render('usermenu') %]
\ No newline at end of file diff -r a9ce584a7f3b -r d997ff96acf1 view/layout/default/simple.tt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/view/layout/default/simple.tt Mon May 19 18:34:16 2014 +0400 @@ -0,0 +1,6 @@ +[% + document.css.push(css.global); +%] +
+ $content +
\ No newline at end of file diff -r a9ce584a7f3b -r d997ff96acf1 view/layout/usermenu.tt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/view/layout/usermenu.tt Mon May 19 18:34:16 2014 +0400 @@ -0,0 +1,17 @@ +[% + IF user.isNobody; + usermenu = [ + { title = 'Login', href= app.location.user.login(ref = location) } + ]; + ELSE; + usermenu = [ + { title = user.name }, + { title = 'Settings', href = app.location.user }, + { title = 'Logout', href = app.location.user.logout } + ]; + IF session.Satisfy(adminRole); + usermenu.push({title = 'Admin', href = app.location.admin }); + END; + END; + render('menu', items = usermenu, class = 'menu-bar float-right', id = 'user-menu'); +%] \ No newline at end of file