2
2
3
3
namespace Gitonomy \Browser ;
4
4
5
+ use Gitonomy \Browser \Controller \MainController ;
6
+ use Gitonomy \Browser \EventListener \RepositoryListener ;
7
+ use Gitonomy \Browser \Git \Repository ;
8
+ use Gitonomy \Browser \Routing \GitUrlGenerator ;
9
+ use Gitonomy \Browser \Utils \RepositoriesFinder ;
10
+ use Gitonomy \Bundle \GitBundle \Twig \GitExtension ;
5
11
use Silex \Application as BaseApplication ;
6
12
use Silex \Provider \FormServiceProvider ;
7
13
use Silex \Provider \ServiceControllerServiceProvider ;
11
17
use Silex \Provider \WebProfilerServiceProvider ;
12
18
use SilexAssetic \AsseticServiceProvider ;
13
19
14
- use Gitonomy \Browser \Controller \MainController ;
15
- use Gitonomy \Browser \EventListener \RepositoryListener ;
16
- use Gitonomy \Browser \Git \Repository ;
17
- use Gitonomy \Browser \Routing \GitUrlGenerator ;
18
- use Gitonomy \Browser \Twig \GitExtension ;
19
- use Gitonomy \Browser \Utils \RepositoriesFinder ;
20
-
21
20
class Application extends BaseApplication
22
21
{
23
22
/**
@@ -69,13 +68,20 @@ public function __construct($configFile, array $extraParam = array())
69
68
$ this ['assetic.asset_manager ' ] = $ this ->share (
70
69
$ this ->extend ('assetic.asset_manager ' , function ($ am , $ app ) {
71
70
$ am ->set ('styles ' , new \Assetic \Asset \AssetCache (
72
- new \Assetic \Asset \GlobAsset (
73
- array (
74
- __DIR__ .'/../../../vendor/twitter/bootstrap/less/bootstrap.less ' ,
75
- __DIR__ .'/Resources/less/*.less ' ,
71
+ new \Assetic \Asset \AssetCollection (array (
72
+ new \Assetic \Asset \GlobAsset (
73
+ array (
74
+ __DIR__ .'/../../../vendor/twitter/bootstrap/less/bootstrap.less ' ,
75
+ __DIR__ .'/Resources/less/*.less ' ,
76
+ ),
77
+ array ($ app ['assetic.filter_manager ' ]->get ('less ' ))
76
78
),
77
- array ($ app ['assetic.filter_manager ' ]->get ('less ' ))
78
- ),
79
+ new \Assetic \Asset \GlobAsset (
80
+ array (
81
+ __DIR__ .'/../../../vendor/gitonomy/git-bundle/Gitonomy/Bundle/GitBundle/Resources/public/css/*.css ' ,
82
+ )
83
+ )
84
+ )),
79
85
new \Assetic \Cache \FilesystemCache (__DIR__ .'/../../../cache/assetic ' )
80
86
));
81
87
$ am ->get ('styles ' )->setTargetPath ('css/styles.css ' );
@@ -86,12 +92,13 @@ public function __construct($configFile, array $extraParam = array())
86
92
__DIR__ .'/../../../web/vendor/jquery-1.9.0.min.js ' ,
87
93
__DIR__ .'/../../../vendor/twitter/bootstrap/js/bootstrap-tooltip.js ' , // Should be loaded before other tw bootstrap assets
88
94
__DIR__ .'/../../../vendor/twitter/bootstrap/js/*.js ' ,
95
+ __DIR__ .'/../../../vendor/gitonomy/git-bundle/Gitonomy/Bundle/GitBundle/Resources/public/js/*.js ' ,
89
96
__DIR__ .'/Resources/js/*.js ' ,
90
97
)
91
98
),
92
99
new \Assetic \Cache \FilesystemCache (__DIR__ .'/../../../cache/assetic ' )
93
100
));
94
- $ am ->get ('scripts ' )->setTargetPath ('js/script .js ' );
101
+ $ am ->get ('scripts ' )->setTargetPath ('js/scripts .js ' );
95
102
return $ am ;
96
103
})
97
104
);
@@ -106,7 +113,9 @@ public function __construct($configFile, array $extraParam = array())
106
113
107
114
// Gitonomy\Browser Service Provider
108
115
$ urlGenerator = new GitUrlGenerator ($ this ['url_generator ' ], $ this ['repositories ' ]);
109
- $ this ['twig ' ]->addExtension (new GitExtension ($ urlGenerator , array ('git/default_theme.html.twig ' )));
116
+ $ this ['twig ' ]->addExtension (new GitExtension ($ urlGenerator , array ('@GitonomyGitBundle/default_theme.html.twig ' )));
117
+
118
+ $ this ['twig.loader.filesystem ' ]->addPath (__DIR__ .'/../../../vendor/gitonomy/git-bundle/Gitonomy/Bundle/GitBundle/Resources/views ' , 'GitonomyGitBundle ' );
110
119
111
120
// Register the Repository Listener
112
121
$ this ['dispatcher ' ]->addSubscriber (new RepositoryListener ($ this ['request_context ' ], $ this ['twig ' ], $ this ['repositories ' ]));
0 commit comments