Changeset - 1db451a44504
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 14 years ago 2011-09-22 14:03:12
marcin@python-works.com
fixed small issues with adding new filenodes
3 files changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -314,12 +314,16 @@ class FilesController(BaseRepoController
 
            author = self.rhodecode_user.full_contact
 

	
 
            if not content:
 
                h.flash(_('No content'), category='warning')
 
                return redirect(url('changeset_home', repo_name=c.repo_name,
 
                                    revision='tip'))
 
            if not filename:
 
                h.flash(_('No filename'), category='warning')
 
                return redirect(url('changeset_home', repo_name=c.repo_name,
 
                                    revision='tip'))                
 

	
 
            try:
 
                self.scm_model.create_node(repo=c.rhodecode_repo,
 
                                             repo_name=repo_name, cs=c.cs,
 
                                             user=self.rhodecode_user,
 
                                             author=author, message=message,
rhodecode/templates/files/files_add.html
Show inline comments
 
@@ -43,12 +43,13 @@
 
                         <div class="field">
 
                            <div class="label">
 
                                <label for="location">${_('Location')}</label>
 
                            </div>
 
                            <div class="input">
 
                                <input type="text" value="${c.f_path}" size="30" name="location" id="location">
 
                                ${_('use / to separate directories')}
 
                            </div>
 
                         </div>
 
                                      
 
                        <div class="field">
 
                            <div class="label">
 
                                <label for="filename">${_('File Name')}:</label>
 
@@ -59,13 +60,13 @@
 
                        </div>                                                    
 
                    </div>
 
            </div>            
 
			<div id="body" class="codeblock">
 
			    <pre id="editor_pre"></pre>
 
				<textarea id="editor" name="content" style="display:none"></textarea>
 
				<div style="padding-top: 10px;">${_('commit message')}</div>
 
				<div style="padding: 10px;color:#666666">${_('commit message')}</div>
 
				<textarea id="commit" name="message" style="height: 100px;width: 99%"></textarea>
 
			</div>
 
			<div style="text-align: right;padding-top: 5px">
 
			<input id="reset" type="button" value="${_('Reset')}" class="ui-button-small" />
 
			${h.submit('commit',_('Commit changes'),class_="ui-button-small-blue")}
 
			</div>
rhodecode/templates/files/files_edit.html
Show inline comments
 
@@ -38,16 +38,14 @@
 
		<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-top: 10px;">${_('commit message')}</div>
 
				<div style="padding: 10px;color:#666666">${_('commit message')}</div>
 
				<textarea id="commit" name="message" style="height: 100px;width: 99%"></textarea>
 
				
 
			</div>
 
			<div style="text-align: right;padding-top: 5px">
 
			<input id="reset" type="button" value="${_('Reset')}" class="ui-button-small" />
 
			${h.submit('commit',_('Commit changes'),class_="ui-button-small-blue")}
 
			</div>
 
			${h.end_form()}
0 comments (0 inline, 0 general)