view rhodecode/templates/files/files_edit.html @ 1723:64e91067b996 beta

- refactoring to overcome poor usage of global pylons config - db transaction fixes - fixed tests - garden
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 26 Nov 2011 02:16:21 +0200
parents 48840976caa8
children 61eda8bf70d0
line wrap: on
line source

<%inherit file="/base/base.html"/>

<%def name="title()">
    ${c.repo_name} ${_('Edit file')} - ${c.rhodecode_name}
</%def>

<%def name="js_extra()">
<script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script>
</%def>
<%def name="css_extra()">
<link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/>
</%def>

<%def name="breadcrumbs_links()">
    ${h.link_to(u'Home',h.url('/'))}
    &raquo;
    ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
    &raquo;
    ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)}
</%def>

<%def name="page_nav()">
		${self.menu('files')}     
</%def>
<%def name="main()">
<div class="box">
    <!-- box / title -->
    <div class="title">
        ${self.breadcrumbs()}
        <ul class="links">
            <li>
              <span style="text-transform: uppercase;">
              <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
            </li>          
        </ul>          
    </div>
    <div class="table">
		<div id="files_data">
			<h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3>
			${h.form(h.url.current(),method='post',id='eform')}
			<div id="body" class="codeblock">
			    <pre id="editor_pre"></pre>
				<textarea id="editor" name="content" style="display:none">${c.file.content|n}</textarea>
				<div style="padding: 10px;color:#666666">${_('commit message')}</div>
				<textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px"></textarea>
			</div>
			<div style="text-align: left;padding-top: 5px">
            ${h.submit('commit',_('Commit changes'),class_="ui-button-small")}
            ${h.reset('reset',_('Reset'),class_="ui-button-small")}
			</div>
			${h.end_form()}
			<script type="text/javascript">
			var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}";
			initCodeMirror('editor',reset_url);
			</script>
		</div>    
    </div>
</div>    
</%def>