changeset 1484:1db451a44504 beta

fixed small issues with adding new filenodes
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 22 Sep 2011 15:03:12 +0300
parents 7b67b0dcad6d
children 269905fac50a
files rhodecode/controllers/files.py rhodecode/templates/files/files_add.html rhodecode/templates/files/files_edit.html
diffstat 3 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/files.py	Thu Sep 22 04:33:29 2011 +0300
+++ b/rhodecode/controllers/files.py	Thu Sep 22 15:03:12 2011 +0300
@@ -317,6 +317,10 @@
                 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,
--- a/rhodecode/templates/files/files_add.html	Thu Sep 22 04:33:29 2011 +0300
+++ b/rhodecode/templates/files/files_add.html	Thu Sep 22 15:03:12 2011 +0300
@@ -46,6 +46,7 @@
                             </div>
                             <div class="input">
                                 <input type="text" value="${c.f_path}" size="30" name="location" id="location">
+                                ${_('use / to separate directories')}
                             </div>
                          </div>
                                       
@@ -62,7 +63,7 @@
 			<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">
--- a/rhodecode/templates/files/files_edit.html	Thu Sep 22 04:33:29 2011 +0300
+++ b/rhodecode/templates/files/files_edit.html	Thu Sep 22 15:03:12 2011 +0300
@@ -41,10 +41,8 @@
 			<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" />