changeset 1250:cc4251628675

merged latest fixes for stable
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 12 Apr 2011 20:10:47 +0200
parents 3343977bc934
children c8974135732a
files docs/changelog.rst rhodecode/controllers/shortlog.py rhodecode/controllers/summary.py rhodecode/lib/celerylib/tasks.py rhodecode/public/css/style.css rhodecode/templates/summary/summary.html
diffstat 6 files changed, 44 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/docs/changelog.rst	Sat Apr 09 23:53:12 2011 +0200
+++ b/docs/changelog.rst	Tue Apr 12 20:10:47 2011 +0200
@@ -29,6 +29,9 @@
 - fixed problems with displaying binary files, thanks to Thomas Waldmann
 - removed name from archive files since it's breaking ui for long names
 - fixed issue witg archive headers sent to browser, thanks to Thomas Waldmann
+- fixed compatibility for 1024px displays, and larger dpi settings, thanks to 
+  Thomas Waldmann
+- fixed issue #166 summary pager was skipping 10 revisions on second page
 
 1.1.7 (**2011-03-23**)
 ======================
--- a/rhodecode/controllers/shortlog.py	Sat Apr 09 23:53:12 2011 +0200
+++ b/rhodecode/controllers/shortlog.py	Tue Apr 12 20:10:47 2011 +0200
@@ -4,10 +4,10 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Shortlog controller for rhodecode
-    
+
     :created_on: Apr 18, 2010
     :author: marcink
-    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,7 @@
 
 import logging
 
-from pylons import tmpl_context as c, request
+from pylons import tmpl_context as c, request, url
 
 from webhelpers.paginate import Page
 
@@ -43,10 +43,17 @@
     def __before__(self):
         super(ShortlogController, self).__before__()
 
-    def index(self):
+    def index(self, repo_name):
         p = int(request.params.get('page', 1))
+        size = int(request.params.get('size', 20))
+
+        print repo_name
+        def url_generator(**kw):
+            return url('shortlog_home', repo_name=repo_name, size=size, **kw)
+
         repo = ScmModel().get_repo(c.repo_name)
-        c.repo_changesets = Page(repo, page=p, items_per_page=20)
+        c.repo_changesets = Page(repo, page=p, items_per_page=size,
+                                                url=url_generator)
         c.shortlog_data = render('shortlog/shortlog_data.html')
         if request.params.get('partial'):
             return c.shortlog_data
--- a/rhodecode/controllers/summary.py	Sat Apr 09 23:53:12 2011 +0200
+++ b/rhodecode/controllers/summary.py	Tue Apr 12 20:10:47 2011 +0200
@@ -4,7 +4,7 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Summary controller for Rhodecode
-    
+
     :created_on: Apr 18, 2010
     :author: marcink
     :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
@@ -60,16 +60,16 @@
     def __before__(self):
         super(SummaryController, self).__before__()
 
-    def index(self):
+    def index(self, repo_name):
         scm_model = ScmModel()
         c.repo_info = scm_model.get_repo(c.repo_name)
         c.following = scm_model.is_following_repo(c.repo_name,
                                              c.rhodecode_user.user_id)
         def url_generator(**kw):
-            return url('shortlog_home', repo_name=c.repo_name, **kw)
+            return url('shortlog_home', repo_name=repo_name, size=10, **kw)
 
-        c.repo_changesets = Page(c.repo_info, page=1, items_per_page=10,
-                                 url=url_generator)
+        c.repo_changesets = Page(c.repo_info, page=1,
+                                                items_per_page=10, url=url_generator)
 
         e = request.environ
 
--- a/rhodecode/lib/celerylib/tasks.py	Sat Apr 09 23:53:12 2011 +0200
+++ b/rhodecode/lib/celerylib/tasks.py	Tue Apr 12 20:10:47 2011 +0200
@@ -208,7 +208,7 @@
         stats.languages = json.dumps(__get_codes_stats(repo_name))
 
     stats.repository = dbrepo
-    stats.stat_on_revision = last_cs.revision
+    stats.stat_on_revision = last_cs.revision if last_cs else 0
 
     try:
         sa.add(stats)
--- a/rhodecode/public/css/style.css	Sat Apr 09 23:53:12 2011 +0200
+++ b/rhodecode/public/css/style.css	Tue Apr 12 20:10:47 2011 +0200
@@ -187,7 +187,7 @@
 
 #header {
 margin:0;
-padding:0 30px;
+padding:0 10px;
 }
 
 
@@ -1265,7 +1265,7 @@
 overflow:hidden;
 text-align:right;
 margin:0;
-padding:0 30px 4px;
+padding:0 10px 4px;
 margin:-10px 0 0;
 }
 
@@ -1916,6 +1916,7 @@
 color:#FFF;
 }
 
+
 .follow{
 background:url("../images/icons/heart_add.png") no-repeat scroll 3px;
 height: 16px;
@@ -1943,80 +1944,72 @@
 
 .add_icon {
 background:url("../images/icons/add.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
-padding-top:1px;
+padding-top:0px;
 text-align:left;
 }
 
 .edit_icon {
 background:url("../images/icons/folder_edit.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
-padding-top:1px;
+padding-top:0px;
 text-align:left;
 }
 
 .delete_icon {
 background:url("../images/icons/delete.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
-padding-top:1px;
+padding-top:0px;
 text-align:left;
 }
 
 .refresh_icon {
 background:url("../images/icons/arrow_refresh.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
-padding-top:1px;
+padding-top:0px;
 text-align:left;
 }
 
 .pull_icon {
 background:url("../images/icons/connect.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
-padding-top:1px;
+padding-top:0px;
 text-align:left;
 }
 
 .rss_icon {
 background:url("../images/icons/rss_16.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
-padding-top:1px;
+padding-top:0px;
 text-align:left;
 }
 
 .atom_icon {
 background:url("../images/icons/atom.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
-padding-top:1px;
+padding-top:0px;
 text-align:left;
 }
 
 .archive_icon {
 background:url("../images/icons/compress.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
 text-align:left;
 padding-top:1px;
 }
+
 .start_following_icon {
 background:url("../images/icons/heart_add.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
 text-align:left;
-padding-top:1px;
+padding-top:0px;
 }
+
 .stop_following_icon {
 background:url("../images/icons/heart_delete.png") no-repeat scroll 3px;
-height:16px;
 padding-left:20px;
 text-align:left;
-padding-top:1px;
+padding-top:0px;
 }
 
 .action_button {
@@ -2144,14 +2137,14 @@
 }
 
 #header,#content,#footer {
-min-width:1024px;
+min-width:978px;
 }
 
 #content {
 min-height:100%;
 clear:both;
 overflow:hidden;
-padding:14px 30px;
+padding:14px 10px;
 }
 
 #content div.box div.title div.search {
@@ -2225,6 +2218,10 @@
 display:block;
 }
 
+#content div.graph{
+padding:0 10px 10px;
+}
+
 #content div.box div.title ul.links li a:hover,#content div.box div.title ul.links li.ui-tabs-selected a {
 color:#bfe3ff;
 }
--- a/rhodecode/templates/summary/summary.html	Sat Apr 09 23:53:12 2011 +0200
+++ b/rhodecode/templates/summary/summary.html	Tue Apr 12 20:10:47 2011 +0200
@@ -247,14 +247,14 @@
         <h5>${_('Commit activity by day / author')}</h5>
     </div>
     
-    <div class="table">
+    <div class="graph">
         
          %if c.no_data:
            <div style="padding:0 10px 10px 15px;font-size: 1.2em;">${c.no_data_msg}</div>
         %endif:  
-        <div id="commit_history" style="width:460px;height:300px;float:left"></div>
+        <div id="commit_history" style="width:450px;height:300px;float:left"></div>
         <div style="clear: both;height: 10px"></div>
-        <div id="overview" style="width:460px;height:100px;float:left"></div>
+        <div id="overview" style="width:450px;height:100px;float:left"></div>
         
     	<div id="legend_data" style="clear:both;margin-top:10px;">
 	    	<div id="legend_container"></div>