Changeset - 44f328d6f209
rhodecode/lib/helpers.py
Show inline comments
 
@@ -336,24 +336,32 @@ flash = _Flash()
 
#==============================================================================
 
from rhodecode.lib.vcs.utils import author_name, author_email
 
from rhodecode.lib.utils2 import credentials_filter, age as _age
 
from rhodecode.model.db import User
 

	
 
age = lambda  x: _age(x)
 
capitalize = lambda x: x.capitalize()
 
email = author_email
 
short_id = lambda x: x[:12]
 
hide_credentials = lambda x: ''.join(credentials_filter(x))
 

	
 

	
 
def fmt_date(date):
 
    if date:
 
        return (date.strftime(_(u"%a, %d %b %Y %H:%M:%S").encode('utf8'))
 
            .decode('utf8'))
 
    
 
    return ""
 

	
 

	
 
def is_git(repository):
 
    if hasattr(repository, 'alias'):
 
        _type = repository.alias
 
    elif hasattr(repository, 'repo_type'):
 
        _type = repository.repo_type
 
    else:
 
        _type = repository
 
    return _type == 'git'
 

	
 

	
 
def is_hg(repository):
 
    if hasattr(repository, 'alias'):
rhodecode/templates/admin/admin_log.html
Show inline comments
 
@@ -16,25 +16,25 @@
 
		  <div class="journal_action_params">
 
            ${h.literal(h.action_parser(l)[1]())}
 
          </div>
 
		</td>
 
		<td>
 
		%if l.repository is not None:
 
		  ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))}
 
		%else:
 
		  ${l.repository_name}
 
		%endif
 
		</td>
 

	
 
		<td>${l.action_date}</td>
 
		<td>${h.fmt_date(l.action_date)}</td>
 
		<td>${l.user_ip}</td>
 
	</tr>
 
	%endfor
 
</table>
 

	
 
<script type="text/javascript">
 
  YUE.onDOMReady(function(){
 
	YUE.delegate("user_log","click",function(e, matchedEl, container){
 
		ypjax(e.target.href,"user_log",function(){show_more_event();tooltip_activate();});
 
		YUE.preventDefault(e);
 
	},'.pager_link');
 

	
rhodecode/templates/admin/users/users.html
Show inline comments
 
@@ -37,25 +37,25 @@
 
            <th class="left">${_('active')}</th>
 
            <th class="left">${_('admin')}</th>
 
            <th class="left">${_('ldap')}</th>
 
            <th class="left">${_('action')}</th>
 
        </tr>
 
            %for cnt,user in enumerate(c.users_list):
 
             %if user.username !='default':
 
                <tr class="parity${cnt%2}">
 
                	<td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div></td>
 
                    <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
 
                    <td>${user.name}</td>
 
                    <td>${user.lastname}</td>
 
                    <td>${user.last_login}</td>
 
                    <td>${h.fmt_date(user.last_login)}</td>
 
                    <td>${h.bool2icon(user.active)}</td>
 
                    <td>${h.bool2icon(user.admin)}</td>
 
                    <td>${h.bool2icon(bool(user.ldap_dn))}</td>
 
                    <td>
 
                        ${h.form(url('delete_user', id=user.user_id),method='delete')}
 
                            ${h.submit('remove_',_('delete'),id="remove_user_%s" % user.user_id,
 
                            class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user: %s') % user.username+"');")}
 
                        ${h.end_form()}
 
                    </td>
 
                </tr>
 
             %endif
 
            %endfor
rhodecode/templates/bookmarks/bookmarks_data.html
Show inline comments
 
@@ -8,25 +8,25 @@
 
            <th class="left">${_('Author')}</th>
 
            <th class="left">${_('Revision')}</th>
 
    	</tr>
 
      </thead>
 
		%for cnt,book in enumerate(c.repo_bookmarks.items()):
 
		<tr class="parity${cnt%2}">
 
            <td>
 
                <span class="logbooks">
 
                    <span class="bookbook">${h.link_to(book[0],
 
                    h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span>
 
                </span>
 
            </td>
 
            <td><span class="tooltip" title="${h.age(book[1].date)}">${book[1].date}</span></td>
 
            <td><span class="tooltip" title="${h.age(book[1].date)}">${h.fmt_date(book[1].date)}</span></td>
 
	        <td title="${book[1].author}">${h.person(book[1].author)}</td>
 
	        <td>
 
              <div>
 
                  <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id)}">r${book[1].revision}:${h.short_id(book[1].raw_id)}</a></pre>
 
              </div>
 
            </td>
 
		</tr>
 
		%endfor
 
    </table>
 
    </div>
 
%else:
 
	${_('There are no bookmarks yet')}
rhodecode/templates/branches/branches_data.html
Show inline comments
 
@@ -8,43 +8,43 @@
 
            <th class="left">${_('author')}</th>
 
            <th class="left">${_('revision')}</th>
 
        </tr>
 
      </thead>
 
		%for cnt,branch in enumerate(c.repo_branches.items()):
 
		<tr class="parity${cnt%2}">
 
            <td>
 
                <span class="logtags">
 
                    <span class="branchtag">${h.link_to(branch[0],
 
                    h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
 
                </span>
 
            </td>
 
            <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span></td>
 
            <td><span class="tooltip" title="${h.age(branch[1].date)}">${h.fmt_date(branch[1].date)}</span></td>
 
            <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
 
            <td>
 
                <div>
 
                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
 
                </div>
 
            </td>
 
		</tr>
 
		%endfor
 
        % if hasattr(c,'repo_closed_branches') and c.repo_closed_branches:
 
          %for cnt,branch in enumerate(c.repo_closed_branches.items()):
 
          <tr class="parity${cnt%2}">
 
              <td>
 
                  <span class="logtags">
 
                      <span class="branchtag">${h.link_to(branch[0]+' [closed]',
 
                      h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
 
                  </span>
 
              </td>
 
              <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span></td>
 
              <td><span class="tooltip" title="${h.age(branch[1].date)}">${h.fmt_date(branch[1].date)}</span></td>
 
              <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
 
              <td>
 
                <div>
 
                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
 
                </div>
 
              </td>
 
          </tr>
 
          %endfor
 
        %endif
 
    </table>
 
    </div>
 
%else:
rhodecode/templates/changelog/changelog.html
Show inline comments
 
@@ -48,25 +48,25 @@ ${c.repo_name} ${_('Changelog')} - ${c.r
 
					<div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
 
						<div class="left">
 
							<div>
 
							${h.checkbox(cs.short_id,class_="changeset_range")}
 
							<span class="tooltip" title="${h.age(cs.date)}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span>
 
							</div>
 
							<div class="author">
 
								<div class="gravatar">
 
									<img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),16)}"/>
 
								</div>
 
								<div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div>
 
							</div>
 
                            <div class="date">${cs.date}</div>
 
                            <div class="date">${h.fmt_date(cs.date)}</div>
 
						</div>
 
						<div class="mid">
 
                            <div class="message">${h.urlify_commit(h.wrap_paragraphs(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>
 
						<div class="right">
 
									<div class="changes">
 
                                        <div id="${cs.raw_id}"  style="float:right;" class="changed_total tooltip" title="${_('Affected number of files, click to show more details')}">${len(cs.affected_files)}</div>
 
                                        <div class="comments-container">
 
                                        %if len(c.comments.get(cs.raw_id,[])) > 0:
 
                                            <div class="comments-cnt" title="${('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)}">
rhodecode/templates/changeset/changeset.html
Show inline comments
 
@@ -22,25 +22,25 @@
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
		<div class="diffblock">
 
			<div class="code-header">
 
                <div class="hash">
 
                 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
 
                </div>
 
                <div class="date">
 
                  ${c.changeset.date}
 
                  ${h.fmt_date(c.changeset.date)}
 
                </div>
 
                <div class="diff-actions">
 
                  <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
 
                  <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" title="${_('download diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></a>
 
                  ${c.ignorews_url(request.GET)}
 
                  ${c.context_url(request.GET)}
 
                </div>
 
                <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div>
 
			</div>
 
		</div>
 
	    <div id="changeset_content">
 
			<div class="container">
rhodecode/templates/changeset/changeset_range.html
Show inline comments
 
@@ -31,25 +31,25 @@
 
				${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
 
				</div>
 
			</div>
 
		</div>
 
	    <div id="changeset_compare_view_content">
 
			<div class="container">
 
			<table class="compare_view_commits noborder">
 
            %for cs in c.cs_ranges:
 
                <tr>
 
                <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td>
 
                <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
 
                <td><div class="author">${h.person(cs.author)}</div></td>
 
                <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
 
                <td><span class="tooltip" title="${h.age(cs.date)}">${h.fmt_date(cs.date)}</span></td>
 
                <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
 
                </tr>
 
            %endfor
 
            </table>
 
	        </div>
 
	        <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
 
	        <div class="cs_files">
 
	               %for cs in c.cs_ranges:
 
	                   <div class="cur_cs">r${cs}</div>
 
	                %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]:
 
	                    <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div>
 
	                %endfor
rhodecode/templates/files/files_browser.html
Show inline comments
 
@@ -86,25 +86,25 @@
 
		                  ${node.mimetype}
 
		              %endif
 
		             </td>
 
		             <td>
 
		             	%if node.is_file():
 
		             		<div class="tooltip" title="${node.last_changeset.message}">
 
		             		<pre>${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</pre>
 
                            </div>
 
		             	%endif
 
		             </td>
 
		             <td>
 
		             	%if node.is_file():
 
		             		<span class="tooltip" title="${node.last_changeset.date}">
 
		             		<span class="tooltip" title="${h.fmt_date(node.last_changeset.date)}">
 
                            ${h.age(node.last_changeset.date)}</span>
 
		             	%endif
 
		             </td>
 
		             <td>
 
		             	%if node.is_file():
 
		             		<span title="${node.last_changeset.author}">
 
                            ${h.person(node.last_changeset.author)}
 
                            </span>
 
		             	%endif
 
		             </td>
 
				</tr>
 
			%endfor
rhodecode/templates/files/files_source.html
Show inline comments
 
@@ -7,25 +7,25 @@
 
		${h.select('diff1',c.file.changeset.raw_id,c.file_history)}
 
		${h.submit('diff','diff to revision',class_="ui-btn")}
 
		${h.submit('show_rev','show at revision',class_="ui-btn")}
 
		${h.end_form()}
 
		</div>
 
	</dd>
 
</dl>
 

	
 
<div id="body" class="codeblock">
 
	<div class="code-header">
 
        <div class="stats">
 
            <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div>
 
            <div class="left item"><pre class="tooltip" title="${c.file.changeset.date}">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</pre></div>
 
            <div class="left item"><pre class="tooltip" title="${h.fmt_date(c.file.changeset.date)}">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</pre></div>
 
            <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div>
 
            <div class="left item last"><pre>${c.file.mimetype}</pre></div>
 
            <div class="buttons">
 
              %if c.annotate:
 
                ${h.link_to(_('show source'),    h.url('files_home',         repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
 
              %else:
 
                ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
 
              %endif
 
              ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
 
              ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
 
              % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
 
               % if not c.file.is_binary:
rhodecode/templates/index_base.html
Show inline comments
 
@@ -80,25 +80,25 @@
 
                      ${dt.quick_menu(repo['name'])}
 
                    </td>
 
                    ##REPO NAME AND ICONS
 
                    <td class="reponame">
 
                      ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'),pageargs.get('short_repo_names'))}
 
                    </td>
 
                    ##DESCRIPTION
 
                    <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
 
                       ${h.truncate(repo['description'],60)}</span>
 
                    </td>
 
                    ##LAST CHANGE DATE
 
                    <td>
 
                      <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span>
 
                      <span class="tooltip" title="${h.fmt_date(repo['last_change'])}">${h.age(repo['last_change'])}</span>
 
                    </td>
 
                    ##LAST REVISION
 
                    <td>
 
                        ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
 
                    </td>
 
                    ##
 
                    <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
 
                    <td>
 
                      %if c.rhodecode_user.username != 'default':
 
                        <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon"  href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a>
 
                      %else:
 
                        <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon"  href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
rhodecode/templates/journal/journal_data.html
Show inline comments
 
@@ -15,25 +15,25 @@
 
		            <div class="journal_action">${h.action_parser(entry)[0]()}</div>
 
		            <div class="journal_repo">
 
		                <span class="journal_repo_name">
 
		                %if entry.repository is not None:
 
		                  ${h.link_to(entry.repository.repo_name,
 
		                              h.url('summary_home',repo_name=entry.repository.repo_name))}
 
		                %else:
 
		                  ${entry.repository_name}
 
		                %endif
 
		                </span>
 
		            </div>
 
		            <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div>
 
		            <div class="date"><span class="tooltip" title="${entry.action_date}">${h.age(entry.action_date)}</span></div>
 
		            <div class="date"><span class="tooltip" title="${h.fmt_date(entry.action_date)}">${h.age(entry.action_date)}</span></div>
 
	            %endfor
 
	            </div>
 
	        </div>
 
        %endfor
 
    %endfor
 

	
 
  <div class="pagination-wh pagination-left">
 
    <script type="text/javascript">
 
    YUE.onDOMReady(function(){
 
        YUE.delegate("journal","click",function(e, matchedEl, container){
 
        	ypjax(e.target.href,"journal",function(){show_more_event();tooltip_activate();});
 
            YUE.preventDefault(e);
rhodecode/templates/shortlog/shortlog_data.html
Show inline comments
 
@@ -10,25 +10,25 @@
 
		<th class="left">${_('tags')}</th>
 
	</tr>
 
%for cnt,cs in enumerate(c.repo_changesets):
 
	<tr class="parity${cnt%2}">
 
        <td>
 
            <div><pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}">r${cs.revision}:${h.short_id(cs.raw_id)}</a></pre></div>
 
        </td>
 
        <td>
 
            ${h.link_to(h.truncate(cs.message,50) or _('No commit message'),
 
            h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id),
 
            title=cs.message)}
 
        </td>
 
        <td><span class="tooltip" title="${cs.date}">
 
        <td><span class="tooltip" title="${h.fmt_date(cs.date)}">
 
                      ${h.age(cs.date)}</span>
 
        </td>
 
		<td title="${cs.author}">${h.person(cs.author)}</td>
 
		<td>
 
			<span class="logtags">
 
                %if cs.branch:
 
				<span class="branchtag">
 
                    ${cs.branch}
 
                </span>
 
                %endif
 
			</span>
 
		</td>
rhodecode/templates/tags/tags_data.html
Show inline comments
 
@@ -9,25 +9,25 @@
 
            <th class="left">${_('Revision')}</th>
 
    	</tr>
 
      </thead>
 
		%for cnt,tag in enumerate(c.repo_tags.items()):
 
		<tr class="parity${cnt%2}">
 
            <td>
 
                <span class="logtags">
 
                    <span class="tagtag">${h.link_to(tag[0],
 
                    h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
 
                    </span>
 
                </span>
 
            </td>
 
            <td><span class="tooltip" title="${h.age(tag[1].date)}">${tag[1].date}</span></td>
 
            <td><span class="tooltip" title="${h.age(tag[1].date)}">${h.fmt_date(tag[1].date)}</span></td>
 
	        <td title="${tag[1].author}">${h.person(tag[1].author)}</td>
 
	        <td>
 
                <div>
 
                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id)}">r${tag[1].revision}:${h.short_id(tag[1].raw_id)}</a></pre>
 
                </div>
 
            </td>
 
		</tr>
 
		%endfor
 
    </table>
 
   </div>
 
%else:
 
	${_('There are no tags yet')}
0 comments (0 inline, 0 general)