diff rhodecode/templates/changelog/changelog.html @ 4116:ffd45b185016 rhodecode-2.2.5-gpl

Imported some of the GPLv3'd changes from RhodeCode v2.2.5. This imports changes between changesets 21af6c4eab3d and 6177597791c2 in RhodeCode's original repository, including only changes to Python files and HTML. RhodeCode clearly licensed its changes to these files under GPLv3 in their /LICENSE file, which states the following: The Python code and integrated HTML are licensed under the GPLv3 license. (See: https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE or http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE for an online copy of that LICENSE file) Conservancy reviewed these changes and confirmed that they can be licensed as a whole to the Kallithea project under GPLv3-only. While some of the contents committed herein are clearly licensed GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the statement above from RhodeCode indicates that they intend GPLv3-only as their license, per GPLv3ยง14 and other relevant sections of GPLv3.
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:03:13 -0400
parents c7e656e96c5d
children 30a683d04e77
line wrap: on
line diff
--- a/rhodecode/templates/changelog/changelog.html	Wed Jul 02 19:03:10 2014 -0400
+++ b/rhodecode/templates/changelog/changelog.html	Wed Jul 02 19:03:13 2014 -0400
@@ -3,11 +3,13 @@
 <%inherit file="/base/base.html"/>
 
 <%def name="title()">
-${_('%s Changelog') % c.repo_name} &middot;
-%if c.changelog_for_path:
-  /${c.changelog_for_path} &middot;
-%endif
-${c.rhodecode_name}
+    ${_('%s Changelog') % c.repo_name}
+    %if c.changelog_for_path:
+      /${c.changelog_for_path}
+    %endif
+    %if c.rhodecode_name:
+        &middot; ${c.rhodecode_name}
+    %endif
 </%def>
 
 <%def name="breadcrumbs_links()">
@@ -34,32 +36,34 @@
         % if c.pagination:
             <div id="graph">
                 <div style="display:${'none' if c.changelog_for_path else ''}">
-                    <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;">
-                        <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
-                        <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
+                    <div class="container_header">
+                       <div style="float:right; margin: 0px 0px 0px 4px">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
+                       <div class="info_box" style="text-align: right; float: right">
+                            <a href="#" class="btn btn-mini" id="rev_range_container" style="display:none"></a>
+                            <a href="#" class="btn btn-mini" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
 
-                        %if c.rhodecode_db_repo.fork:
-                            <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a>
-                        %endif
-                        %if h.is_hg(c.rhodecode_repo):
-                        <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
-                        %endif
-                    </div>
-                    <div class="container_header">
-                        ${h.form(h.url.current(),method='get')}
-                        <div style="float:left">
-                            ${h.submit('set',_('Show'),class_="ui-btn")}
-                            ${h.text('size',size=1,value=c.size)}
-                            ${_('revisions')}
-                        </div>
-                        ${h.end_form()}
-                        <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
+                            %if c.rhodecode_db_repo.fork:
+                                <a id="compare_fork"
+                                   title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}"
+                                   href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type=c.rhodecode_db_repo.landing_rev[0],org_ref=c.rhodecode_db_repo.landing_rev[1],other_repo=c.repo_name,other_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],other_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], merge=1)}"
+                                   class="btn btn-mini"><i class="icon-loop"></i> ${_('Compare fork with Parent(%s)' % c.rhodecode_db_repo.fork.repo_name)}</a>
+                            %endif
+                            <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="btn btn-mini">${_('Open new pull request')}</a>
+                       </div>
+
+                       ${h.form(h.url.current(),method='get')}
+                       <div style="float:left">
+                           ${h.submit('set',_('Show'),class_="btn btn-mini")}
+                           ${h.text('size',size=1,value=c.size)}
+                           ${_('revisions')}
+                       </div>
+                       ${h.end_form()}
                     </div>
                 </div>
                 <div id="graph_nodes">
                     <canvas id="graph_canvas"></canvas>
                 </div>
-                <div id="graph_content">
+                <div id="graph_content" style="${'margin: 0px' if c.changelog_for_path else ''}">
 
                 <table id="changesets">
                 <tbody>
@@ -98,16 +102,19 @@
                         <td class="date">
                             <div class="date">${h.age(cs.date,True)}</div>
                         </td>
+                        <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
+                            <i class="icon-resize-vertical" style="color:#DDD"></i>
+                        </td>
                         <td class="mid">
                             <div class="log-container">
-                                <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
-                                <div class="expand"><span class="expandtext">&darr; ${_('Show more')} &darr;</span></div>
+                                <div class="message" id="C-${cs.raw_id}">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
                                 <div class="extra-container">
                                     %if c.comments.get(cs.raw_id):
                                         <div class="comments-container">
                                             <div class="comments-cnt" title="${_('Changeset has comments')}">
                                                 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
                                                     ${len(c.comments[cs.raw_id])}
+                                                    <i class="icon-comment-alt icon-comment-colored"></i>
                                                 </a>
                                             </div>
                                         </div>
@@ -152,8 +159,6 @@
                 var checkboxes = YUD.getElementsByClassName('changeset_range');
                 // register our routes needed for this view
                 pyroutes.register('changeset_home', "${h.url('changeset_home', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
-                pyroutes.register('changelog_home', "${h.url('changelog_home', repo_name='%(repo_name)s')}", ['repo_name']);
-                pyroutes.register('pullrequest_home', "${h.url('pullrequest_home', repo_name='%(repo_name)s')}", ['repo_name']);
 
                 var checkbox_checker = function(e){
                     var checked_checkboxes = [];
@@ -239,17 +244,16 @@
                         YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
                     };
                 }
-                YUE.on(YUQ('.expand'),'click',function(e){
-                    var elem = e.currentTarget.parentNode.parentNode;
-                    YUD.setStyle(e.currentTarget,'display','none');
-                    YUD.setStyle(elem,'height','auto');
 
+                $('.expand_commit').on('click',function(e){
+                    $(this).children('i').hide();
+                    var cid = $(this).attr('commit_id');
+                    $('#C-'+cid).css({'height': 'auto', 'margin': '4px 0px 4px 0px'})
                     //redraw the graph, line_count and jsdata are global vars
                     set_canvas(100);
 
                     var r = new BranchRenderer();
                     r.render(jsdata,100,line_count);
-
                 });
 
                 // change branch filter
@@ -289,6 +293,7 @@
                 r.render(jsdata,100,line_count);
 
             });
+
         </script>
         %else:
             ${_('There are no changes yet')}