格式化代码

This commit is contained in:
sw 2014-10-20 14:23:10 +08:00
parent f5a7aec3c0
commit 65b80959a6
2 changed files with 25 additions and 11 deletions

View File

@ -19,8 +19,11 @@
</div>
<div>
<script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
<%= f.text_area :description, :required => true, :id => 'editor01' %>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01',{height:300});</script>
<p style="max-width:680px">
<%= f.text_area :description, :required => true, :id => 'editor01' %>
</p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
<p style="color: #ff0000">(<%= l(:label_forums_max_length) %>)</p>
</div>
<div class="actions" style=" padding-top: 10px; float:right">

View File

@ -11,20 +11,31 @@
</p>
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></p>
<p style="display: none"><%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?,
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}"%>
<p style="display: none">
<%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?,
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}"%>
<% unless @repository.identifier_frozen? %>
<em class="info" ><%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %></em>
<em class="info" >
<%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %>
<%= l(:text_repository_identifier_info).html_safe %></em>
<% end %></p>
<!--Modified by tanxianbo-->
<p><%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %>
<em class='info'><%= "#{l(:label_exist_repository_path)}" %></em>
<p>
<%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %>
<em class='info'>
<%= "#{l(:label_exist_repository_path)}" %>
</em>
</p>
<p>
<%= f.text_field :login, :size => 30 %>
</p>
<p>
<%= f.password_field :password, :size => 30, :name => 'ignore',
:value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)),
:onfocus => "this.value=''; this.name='repository[password]';",
:onchange => "this.name='repository[password]';" %>
</p>
<p><%= f.text_field :login, :size => 30 %></p>
<p><%= f.password_field :password, :size => 30, :name => 'ignore', :value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)),
:onfocus => "this.value=''; this.name='repository[password]';",
:onchange => "this.name='repository[password]';" %></p>
</div>
<!--Ended by tanxianbo-->
<p>