Split subincludes out into their own /fragment controllers.
authorTomas Doran <bobtfish@bobtfish.net>
Sun, 17 Jan 2010 19:59:37 +0000 (19:59 +0000)
committerTomas Doran <bobtfish@bobtfish.net>
Sun, 17 Jan 2010 19:59:37 +0000 (19:59 +0000)
commitecb0ebe7c64899b8fd307ae2dcef609fb2811a7d
tree92653796a53200b57436bb52bcc36fabd582ef8d
parent103b1b992ac192806248eabc64d16aca0f585e2e
Split subincludes out into their own /fragment controllers.

This moves most of the logic round, and adds a role which I called ::URIStructure::XX
as that is what it was conceptually for. However as it seems to have the repos lookup (and as we need to lookup the repos to work out if it exists in the top level for 404) - it's no longer so clean at all..

I think that I'm going to add a ->has_project method to the model which I can
call for the 404 in the wrapped page, then the actual 'get project' logic can
just be in the /fragment code and the conceptual purity of 'URIStructure' is restored somewhat..
Makefile.PL
lib/Gitalist/Controller/Fragment.pm [new file with mode: 0644]
lib/Gitalist/Controller/Fragment/Repository.pm [new file with mode: 0644]
lib/Gitalist/Controller/Repository.pm
lib/Gitalist/URIStructure/Repository.pm [new file with mode: 0644]
root/fragment/repository/heads.tt2 [new file with mode: 0644]
root/fragment/repository/shortlog.tt2 [new file with mode: 0644]
root/fragment/repository/summary.tt2 [new file with mode: 0644]
root/repository/heads.tt2
root/repository/shortlog.tt2
root/repository/summary.tt2