Changeset - cabe887a9829
[Not reviewed]
beta
0 8 0
Marcin Kuzminski - 15 years ago 2011-02-15 18:52:08
marcin@python-works.com
removed obsolete _static flag from url, and fixed urls in webhelpers
8 files changed with 45 insertions and 42 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -409,16 +409,18 @@ def bool2icon(value):
 
    icons
 
    
 
    :param value: bool value
 
    """
 

	
 
    if value is True:
 
        return HTML.tag('img', src="/images/icons/accept.png", alt=_('True'))
 
        return HTML.tag('img', src=url("/images/icons/accept.png"),
 
                        alt=_('True'))
 

	
 
    if value is False:
 
        return HTML.tag('img', src="/images/icons/cancel.png", alt=_('False'))
 
        return HTML.tag('img', src=url("/images/icons/cancel.png"),
 
                        alt=_('False'))
 

	
 
    return value
 

	
 

	
 
def action_parser(user_log):
 
    """This helper will map the specified string action into translated
 
@@ -515,13 +517,13 @@ def action_parser_icon(user_log):
 
    action_params = None
 
    x = action.split(':')
 

	
 
    if len(x) > 1:
 
        action, action_params = x
 

	
 
    tmpl = """<img src="/images/icons/%s" alt="%s"/>"""
 
    tmpl = """<img src="%s/%s" alt="%s"/>"""
 
    map = {'user_deleted_repo':'database_delete.png',
 
           'user_created_repo':'database_add.png',
 
           'user_forked_repo':'arrow_divide.png',
 
           'user_updated_repo':'database_edit.png',
 
           'admin_deleted_repo':'database_delete.png',
 
           'admin_created_repo':'database_add.png',
 
@@ -529,13 +531,14 @@ def action_parser_icon(user_log):
 
           'admin_updated_repo':'database_edit.png',
 
           'push':'script_add.png',
 
           'pull':'down_16.png',
 
           'started_following_repo':'heart_add.png',
 
           'stopped_following_repo':'heart_delete.png',
 
            }
 
    return literal(tmpl % (map.get(action, action), action))
 
    return literal(tmpl % ((url('/images/icons/')),
 
                           map.get(action, action), action))
 

	
 

	
 
#==============================================================================
 
# PERMS
 
#==============================================================================
 
from rhodecode.lib.auth import HasPermissionAny, HasPermissionAll, \
rhodecode/public/css/style.css
Show inline comments
 
@@ -308,13 +308,13 @@ height:1%;
 
display:block;
 
clear:both;
 
overflow:hidden;
 
color:#FFF;
 
font-weight:700;
 
text-decoration:none;
 
background:#369 url("../../images/quick_l.png") no-repeat top left;
 
background:#369 url("../images/quick_l.png") no-repeat top left;
 
padding:0;
 
}
 
 
#header #header-inner #quick li span.short {
 
padding:9px 6px 8px 6px;
 
}
 
@@ -322,13 +322,13 @@ padding:9px 6px 8px 6px;
 
#header #header-inner #quick li span {
 
top:0;
 
right:0;
 
height:1%;
 
display:block;
 
float:left;
 
background:url("../../images/quick_r.png") no-repeat top right;
 
background:url("../images/quick_r.png") no-repeat top right;
 
border-left:1px solid #3f6f9f;
 
margin:0;
 
padding:10px 12px 8px 10px;
 
}
 
 
#header #header-inner #quick li span.normal {
 
@@ -337,39 +337,39 @@ padding:10px 12px 8px;
 
}
 
 
#header #header-inner #quick li span.icon {
 
top:0;
 
left:0;
 
border-left:none;
 
background:url("../../images/quick_l.png") no-repeat top left;
 
background:url("../images/quick_l.png") no-repeat top left;
 
border-right:1px solid #2e5c89;
 
padding:8px 8px 4px;
 
}
 
 
#header #header-inner #quick li span.icon_short {
 
top:0;
 
left:0;
 
border-left:none;
 
background:url("../../images/quick_l.png") no-repeat top left;
 
background:url("../images/quick_l.png") no-repeat top left;
 
border-right:1px solid #2e5c89;
 
padding:9px 4px 4px;
 
}
 
 
#header #header-inner #quick li a:hover {
 
background:#4e4e4e url("../../images/quick_l_selected.png") no-repeat top left;
 
background:#4e4e4e url("../images/quick_l_selected.png") no-repeat top left;
 
}
 
 
#header #header-inner #quick li a:hover span {
 
border-left:1px solid #545454;
 
background:url("../../images/quick_r_selected.png") no-repeat top right;
 
background:url("../images/quick_r_selected.png") no-repeat top right;
 
}
 
 
#header #header-inner #quick li a:hover span.icon,#header #header-inner #quick li a:hover span.icon_short {
 
border-left:none;
 
border-right:1px solid #464646;
 
background:url("../../images/quick_l_selected.png") no-repeat top left;
 
background:url("../images/quick_l_selected.png") no-repeat top left;
 
}
 
 
 
#header #header-inner #quick ul {
 
top:29px;
 
right:0;
 
@@ -1001,24 +1001,24 @@ border-bottom:1px solid #257897;
 
color:#FFF;
 
margin:0;
 
padding:6px 12px;
 
}
 
 
#content div.box div.form div.fields div.buttons div.highlight input.ui-button {
 
background:#4e85bb url("../../images/button_highlight.png") repeat-x;
 
background:#4e85bb url("../images/button_highlight.png") repeat-x;
 
border-top:1px solid #5c91a4;
 
border-left:1px solid #2a6f89;
 
border-right:1px solid #2b7089;
 
border-bottom:1px solid #1a6480;
 
color:#fff;
 
margin:0;
 
padding:6px 12px;
 
}
 
 
#content div.box div.form div.fields div.buttons div.highlight input.ui-state-hover {
 
background:#46a0c1 url("../../images/button_highlight_selected.png") repeat-x;
 
background:#46a0c1 url("../images/button_highlight_selected.png") repeat-x;
 
border-top:1px solid #78acbf;
 
border-left:1px solid #34819e;
 
border-right:1px solid #35829f;
 
border-bottom:1px solid #257897;
 
color:#fff;
 
margin:0;
 
@@ -1289,13 +1289,13 @@ color:#FFF;
 
 
#login div.title {
 
width:420px;
 
clear:both;
 
overflow:hidden;
 
position:relative;
 
background:#003367 url("../../images/header_inner.png") repeat-x;
 
background:#003367 url("../images/header_inner.png") repeat-x;
 
margin:0 auto;
 
padding:0;
 
}
 
 
#login div.inner {
 
width:380px;
 
@@ -1775,13 +1775,13 @@ text-decoration:none;
 
color:red;
 
font-size:1.2em;
 
padding-left:4px;
 
}
 
 
.info_box * {
 
background:url("../../images/pager.png") repeat-x scroll 0 0 #EBEBEB;
 
background:url("../images/pager.png") repeat-x scroll 0 0 #EBEBEB;
 
color:#4A4A4A;
 
font-weight:700;
 
height:1%;
 
display:inline;
 
border-color:#DEDEDE #C4C4C4 #C4C4C4 #CFCFCF;
 
border-style:solid;
 
@@ -2017,34 +2017,34 @@ color:#FFF;
 
margin:0;
 
padding:0 0 10px;
 
}
 
 
.error_msg {
 
background-color:#FFCFCF;
 
background-image:url("../../images/icons/error_msg.png");
 
background-image:url("../images/icons/error_msg.png");
 
border:1px solid #FF9595;
 
color:#C30;
 
}
 
 
.warning_msg {
 
background-color:#FFFBCC;
 
background-image:url("../../images/icons/warning_msg.png");
 
background-image:url("../images/icons/warning_msg.png");
 
border:1px solid #FFF35E;
 
color:#C69E00;
 
}
 
 
.success_msg {
 
background-color:#D5FFCF;
 
background-image:url("../../images/icons/success_msg.png");
 
background-image:url("../images/icons/success_msg.png");
 
border:1px solid #97FF88;
 
color:#090;
 
}
 
 
.notice_msg {
 
background-color:#DCE3FF;
 
background-image:url("../../images/icons/notice_msg.png");
 
background-image:url("../images/icons/notice_msg.png");
 
border:1px solid #93A8FF;
 
color:#556CB5;
 
}
 
 
.success_msg,.error_msg,.notice_msg,.warning_msg {
 
background-position:10px center;
 
@@ -2058,13 +2058,13 @@ margin-top:0;
 
display:block;
 
overflow:auto;
 
padding:6px 10px 6px 40px;
 
}
 
 
#msg_close {
 
background:transparent url("../../icons/cross_grey_small.png") no-repeat scroll 0 0;
 
background:transparent url("../icons/cross_grey_small.png") no-repeat scroll 0 0;
 
cursor:pointer;
 
height:16px;
 
position:absolute;
 
right:5px;
 
top:5px;
 
width:16px;
 
@@ -2108,45 +2108,45 @@ min-height:100%;
 
clear:both;
 
overflow:hidden;
 
padding:14px 30px;
 
}
 
 
#content div.box div.title div.search {
 
background:url("../../images/title_link.png") no-repeat top left;
 
background:url("../images/title_link.png") no-repeat top left;
 
border-left:1px solid #316293;
 
}
 
 
#content div.box div.title div.search div.input input {
 
border:1px solid #316293;
 
}
 
 
#content div.box div.title div.search div.button input.ui-button {
 
background:#4e85bb url("../../images/button_highlight.png") repeat-x;
 
background:#4e85bb url("../images/button_highlight.png") repeat-x;
 
border:1px solid #316293;
 
border-left:none;
 
color:#FFF;
 
}
 
 
#content div.box div.title div.search div.button input.ui-state-hover {
 
background:#46a0c1 url("../../images/button_highlight_selected.png") repeat-x;
 
background:#46a0c1 url("../images/button_highlight_selected.png") repeat-x;
 
border:1px solid #316293;
 
border-left:none;
 
color:#FFF;
 
}
 
 
#content div.box div.form div.fields div.field div.highlight .ui-button {
 
background:#4e85bb url("../../images/button_highlight.png") repeat-x;
 
background:#4e85bb url("../images/button_highlight.png") repeat-x;
 
border-top:1px solid #5c91a4;
 
border-left:1px solid #2a6f89;
 
border-right:1px solid #2b7089;
 
border-bottom:1px solid #1a6480;
 
color:#fff;
 
}
 
 
#content div.box div.form div.fields div.field div.highlight .ui-state-hover {
 
background:#46a0c1 url("../../images/button_highlight_selected.png") repeat-x;
 
background:#46a0c1 url("../images/button_highlight_selected.png") repeat-x;
 
border-top:1px solid #78acbf;
 
border-left:1px solid #34819e;
 
border-right:1px solid #35829f;
 
border-bottom:1px solid #257897;
 
color:#fff;
 
}
rhodecode/templates/base/base.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
 
<head>
 
    <title>${next.title()}</title>
 
    <link rel="icon" href="${h.url('/images/icons/database_gear.png',_static=True)}" type="image/png" />
 
    <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" />
 
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
    <meta name="robots" content="index, nofollow"/>
 
    <!-- stylesheets -->
 
    ${self.css()}
 
    <!-- scripts -->
 
    ${self.js()}
 
@@ -323,27 +323,27 @@
 
			</ul>
 
		%endif    
 
</%def>
 

	
 

	
 
<%def name="css()">
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/style.css',_static=True)}" media="screen" />
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css',_static=True)}"  />
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/diff.css',_static=True)}"  />
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css')}"  />
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/diff.css')}"  />
 
</%def>
 

	
 
<%def name="js()">
 
##<script type="text/javascript" src="${h.url('/js/yui/utilities/utilities.js',_static=True)}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/container/container.js',_static=True)}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/datasource/datasource.js',_static=True)}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/autocomplete/autocomplete.js',_static=True)}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/selector/selector-min.js',_static=True)}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/utilities/utilities.js')}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/container/container.js')}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/datasource/datasource.js')}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/autocomplete/autocomplete.js')}"></script>
 
##<script type="text/javascript" src="${h.url('/js/yui/selector/selector-min.js')}"></script>
 

	
 
<script type="text/javascript" src="${h.url('/js/yui2a.js',_static=True)}"></script>
 
<!--[if IE]><script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js',_static=True)}"></script><![endif]-->
 
<script type="text/javascript" src="${h.url('/js/yui.flot.js',_static=True)}"></script>
 
<script type="text/javascript" src="${h.url('/js/yui2a.js')}"></script>
 
<!--[if IE]><script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script><![endif]-->
 
<script type="text/javascript" src="${h.url('/js/yui.flot.js')}"></script>
 

	
 
<script type="text/javascript">
 
var base_url  = "${h.url('toggle_following')}";
 
var YUC = YAHOO.util.Connect;
 
var YUD = YAHOO.util.Dom;
 
var YUE = YAHOO.util.Event;
rhodecode/templates/changelog/changelog.html
Show inline comments
 
@@ -98,13 +98,13 @@ ${c.repo_name} ${_('Changelog')} - ${c.r
 
				<div class="pagination-wh pagination-left">
 
					${c.pagination.pager('$link_previous ~2~ $link_next')}
 
				</div>			
 
				</div>
 
			</div>
 
			
 
			<script type="text/javascript" src="${h.url('/js/graph.js',_static=True)}"></script>
 
			<script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
 
			<script type="text/javascript">
 
				YAHOO.util.Event.onDOMReady(function(){
 
					
 
                    //Monitor range checkboxes and build a link to changesets
 
                    //ranges
 
                    var checkboxes = YUD.getElementsByClassName('changeset_range');
rhodecode/templates/errors/error_document.html
Show inline comments
 
@@ -8,13 +8,13 @@
 
	        <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
 
	    %endif        
 
        <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
        <meta name="robots" content="index, nofollow"/>
 
            
 
        <!-- stylesheets -->
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css',_static=True)}" media="screen" />
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
 
	    <style type="text/css">
 
	     #main_div{
 
	       border: 0px solid #000;
 
	       width: 500px;
 
	       margin: auto;
 
	       text-align: center;
rhodecode/templates/login.html
Show inline comments
 
@@ -5,13 +5,13 @@
 
        <title>${_('Sign In')} - ${c.rhodecode_name}</title>
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        <link rel="icon" href="/images/icons/database_gear.png" type="image/png" />
 
        <meta name="robots" content="index, nofollow"/>
 
            
 
        <!-- stylesheets -->
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css',_static=True)}" media="screen" />
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
 

	
 
    </head>
 
    <body>
 
<div id="login">
 
            <!-- login -->
 
            <div class="title top-left-rounded-corner top-right-rounded-corner">
rhodecode/templates/password_reset.html
Show inline comments
 
@@ -5,13 +5,13 @@
 
        <title>${_('Reset You password')} - ${c.rhodecode_name}</title>
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
        <meta name="robots" content="index, nofollow"/>
 
            
 
        <!-- stylesheets -->
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css',_static=True)}" media="screen" />
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
 

	
 
    </head>
 
    <body>
 
		<div id="register">
 
			
 
			<div class="title top-left-rounded-corner top-right-rounded-corner">
rhodecode/templates/register.html
Show inline comments
 
@@ -5,13 +5,13 @@
 
        <title>${_('Sign Up')} - ${c.rhodecode_name}</title>
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
        <meta name="robots" content="index, nofollow"/>
 
            
 
        <!-- stylesheets -->
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css',_static=True)}" media="screen" />
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
 

	
 
    </head>
 
    <body>
 
		<div id="register">
 
			
 
			<div class="title top-left-rounded-corner top-right-rounded-corner">
0 comments (0 inline, 0 general)