Remove the description if it is the default "Unnamed repo..."
[catagits/Gitalist.git] / root / wrapper.tt2
index 56fb860..f252e13 100755 (executable)
   -%] (Gitalist)</title>
   [% INCLUDE '_header_feeds.tt2' %]
    
-       <link rel="stylesheet" type="text/css" href="[% c.uri_for('/static/css/core.css') %]" />
+       <link rel="stylesheet" type="text/css" href="[% c.uri_for('/core.css') %]" />
        <link rel="shortcut icon" href="[% c.uri_for('/static/git-favicon.png') %]" type="image/png" />
+       <script type="text/javascript">
+       // FIXME: this should be in an external js file once c.uri_for works in js files
+       function compareDiffs(repo, path){
+               var f = document.theform;
+               if(!repo){
+                       var repo = "";
+               }
+               if(!path){
+                       var path = "";
+               }
+               var sha1,sha2;
+               for(var i=0,len=f.length;i<len;i++){
+                       if(f[i].name == "sha1_a"){
+                               if(f[i].checked){
+                                       sha1 = f[i].value;
+                               }
+                       }
+                       if(f[i].name == "sha1_b"){
+                               if(f[i].checked){
+                                       sha2 = f[i].value;
+                               }
+                       }
+               }
+               document.location.href = "[% c.uri_for("/") %]" + repo + "/"+ sha1 + "/diff/" + sha2 + "/" + path;
+       }
+       </script>
 </head>
 
 <body>
 <div id="footer_holder">
        <div id="footer" class="sub_holder">
                
-               <p>[% IF Repository; Repository.description | html; END; %]</p>
+               <p>[% IF Repository; Repository.description | html IF Repository.description != "Unnamed repository; edit this file to name it for gitweb." ; END; %]</p>
        
                <a title="git homepage" href="http://git-scm.org"><img src="[% c.uri_for('/logo.png') %]" id="git_logo" alt="git" /></a>
                
        [% USE Dumper %]
        <pre>
        [% Repository.path %]
-       [%# Dumper.dump(c.req.path) %]
+       [%# Dumper.dump(c.req.arguments.0) %]
        </pre>
        
        </div>