调整页面样式

This commit is contained in:
sw 2014-07-10 09:21:24 +08:00
parent aec6d33db7
commit 76db0e61c3
4 changed files with 194 additions and 185 deletions

View File

@ -1,19 +1,19 @@
<script type="text/javascript">
function get_options(value){
$.ajax({
type :"POST",
url :'/school/get_options/'+encodeURIComponent(value),
data :'text',
success: function(data){
$("#occupation").html(data);
}
}
)
}
</script>
<script type="text/javascript">
function get_options(value){
$.ajax({
type :"POST",
url :'/school/get_options/'+encodeURIComponent(value),
data :'text',
success: function(data){
$("#occupation").html(data);
}
}
)
}
</script>
<% object = [] %>
@ -23,68 +23,68 @@
<!--[form:course]-->
<% unless @course.new_record? %>
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@course} %></p>
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@course} %></p>
<% end %>
<!-- <p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p> -->
<!-- <p><%#= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p> -->
<p><label for="course_name" style="font-size: 13px;" ><%=l(:label_tags_course_name)%><span class="required" > *&nbsp;&nbsp;</span></label><input id="course_name" type="text" value="<%=@course.name%>" style="width:490px;" size="60" name="course[name]"></p>
<!-- <p><%= f.text_field :extra, :required => true, :size => 60, :style => "width:488px;", :disabled => @course.extra_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<% unless @course.extra_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_course_identifier_info).html_safe %></em>
<% end %></p> -->
<!-- <p><%#= f.text_field :extra, :required => true, :size => 60, :style => "width:488px;", :disabled => @course.extra_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<%# unless @course.extra_frozen? %>
<em class="info"><%#= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%#= l(:text_course_identifier_info).html_safe %></em>
<%# end %></p> -->
<!-- added by bai 新增开课时间、结课时间、课时 -->
<%= f.fields_for @course do |m| %>
<!-- added by bai 新增开课时间、结课时间、课时 -->
<%= f.fields_for @course do |m| %>
<!-- added by bai 新增开课时间、结课时间、课时 -->
<!--
<% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_setup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :setup_time, @course.setup_time, :placeholder => "在此选择开课日期" %></span>
<span><%= calendar_for('setup_time')%></span>
<!-- added by bai 新增开课时间、结课时间、课时 -->
<!--
<%# unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_setup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%#= text_field_tag :setup_time, @course.setup_time, :placeholder => "在此选择开课日期" %></span>
<span><%#= calendar_for('setup_time')%></span>
</td></tr></table></p>
<% else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_setup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :setup_time, nil, :placeholder => "在此选择开课日期" %></span>
<span><%= calendar_for('setup_time')%></span>
<%# else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_setup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%#= text_field_tag :setup_time, nil, :placeholder => "在此选择开课日期" %></span>
<span><%#= calendar_for('setup_time')%></span>
</td></tr></table></p>
<% end %>
<% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_endup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :endup_time, @course.endup_time, :placeholder => "在此选择结课日期" %></span>
<span><%= calendar_for('endup_time')%></span>
<%# end %>
<%# unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_endup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%#= text_field_tag :endup_time, @course.endup_time, :placeholder => "在此选择结课日期" %></span>
<span><%#= calendar_for('endup_time')%></span>
</td></tr></table></p>
<% else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_endup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :endup_time, nil, :placeholder => "在此选择结课日期" %></span>
<span><%= calendar_for('endup_time')%></span>
<%# else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_endup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%#= text_field_tag :endup_time, nil, :placeholder => "在此选择结课日期" %></span>
<span><%#= calendar_for('endup_time')%></span>
</td></tr></table></p>
<% end %>
-->
<% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span>
</td></tr></table></p>
<% else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %></span><strong><%= l(:label_class_hour)%></strong>
</td></tr></table></p>
<% end %>
<!-- end -->
<!-- added by bai 增加了“年度”和“学期” -->
<p><table><tr><td>
<% unless @course.nil? %>
<% if @course.time == 2008 %>
<p><table><tr><td class="info" align="right" style="width: 86px; margin-left:20px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008' selected='selected'>2008</option>
<%# end %>
-->
<% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span>
</td></tr></table></p>
<% else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %></span><strong><%= l(:label_class_hour)%></strong>
</td></tr></table></p>
<% end %>
<!-- end -->
<!-- added by bai 增加了“年度”和“学期” -->
<p><table><tr><td>
<% unless @course.nil? %>
<% if @course.time == 2008 %>
<p><table><tr><td class="info" align="right" style="width: 86px; margin-left:20px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008' selected='selected'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -94,12 +94,12 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table>
</p>
<% elsif @course.time == 2009 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
</p>
<% elsif @course.time == 2009 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009' selected='selected'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -109,11 +109,11 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2010 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2010 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010' selected='selected'>2010</option>
<option value = '2011'>2011</option>
@ -123,11 +123,11 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2011 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2011 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011' selected='selected'>2011</option>
@ -137,12 +137,12 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2012 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2012 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -152,11 +152,11 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2013 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2013 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -166,11 +166,11 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2014 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2014 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -180,11 +180,11 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2015 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2015 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -194,11 +194,11 @@
<option value = '2015' selected='selected'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2016 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2016 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -208,11 +208,11 @@
<option value = '2015'>2015</option>
<option value = '2016' selected='selected'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2017 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% elsif @course.time == 2017 %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -222,10 +222,10 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017' selected='selected'>2017</option>".html_safe %></td></tr></table></p>
<% else %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<% else %>
<p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option>
<option value = '2010'>2010</option>
<option value = '2011'>2011</option>
@ -235,72 +235,81 @@
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% end %>
<% end %>
</td>
<td>
<% unless @course.nil? %>
<% if @course.term == l(:label_spring) %>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}' selected='selected'>#{l(:label_spring)}</option>
<% end %>
<% end %>
</td>
<td>
<% unless @course.nil? %>
<% if @course.term == l(:label_spring) %>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}' selected='selected'>#{l(:label_spring)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
".html_safe %></td></tr></table></p>
<% elsif @course.term == l(:label_summer)%>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<% elsif @course.term == l(:label_summer)%>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
".html_safe %></td></tr></table></p>
<% elsif @course.term == l(:label_autumn)%>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<% elsif @course.term == l(:label_autumn)%>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_autumn)}' selected='selected'>#{l(:label_autumn)}</option>
".html_safe %></td></tr></table></p>
<% elsif @course.term == l(:label_winter)%>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
".html_safe %></td></tr></table></p>
<% else %>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
".html_safe %></td></tr></table></p>
<% end %>
<% end %></td></tr></table>
</p>
<!-- end -->
<!--added by Wen -->
<!-- end -->
<!-- <p style="margin-left:-10px;"><%#= m.text_field :password, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> -->
<p style="margin-left:-10px;"><label for="course[course]_password" style="font-size: 13px;" ><%=l(:label_new_course_password)%><span class="required"> *</span></label><input id="course_course_password" type="text" style="width:488px;margin-left: 10px;" value="<%=@course.password %>" size="60" name="course[password]"></p>
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
<% end %>
<% elsif @course.term == l(:label_winter)%>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
".html_safe %></td></tr></table></p>
<% else %>
<p><table><tr>
<td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
".html_safe %></td></tr></table></p>
<% end %>
<% end %></td></tr></table>
</p>
<!-- end -->
<!--added by Wen -->
<!-- end -->
<!-- <p style="margin-left:-10px;"><%#= m.text_field :password, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> -->
<p style="margin-left:-10px;"><label for="course[course]_password" style="font-size: 13px;" ><%=l(:label_new_course_password)%><span class="required"> *</span></label><input id="course_course_password" type="text" style="width:488px;margin-left: 10px;" value="<%=@course.password %>" size="60" name="course[password]"></p>
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
<% end %>
<!-- <p style="margin-left:-10px;padding-right: 20px;"><%#= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %></p> -->
<p style="margin-left:-20px;padding-right: 20px;"><label for="course_description" style="font-size: 13px;"><%=l(:label_new_course_description)%></label><span class="jstEditor"><textarea id="course_description" class="wiki-edit" style="font-size:small;width:490px;margin-left:10px;" rows="8" name="course[description]" cols="40" ><%=@course.description%></textarea></span></p>
<p style="padding-right: 20px;">
<label for="course_description" style="font-size: 13px;">
<%=l(:label_new_course_description)%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<span class="jstEditor">
<textarea id="course_description" class="wiki-edit" style="font-size:small;width:490px;margin-left:10px;" rows="8" name="course[description]" cols="40" >
<%=@course.description%>
</textarea>
</span>
</p>
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_course_public_info) %></em></p><!-- modified by bai -->
@ -310,7 +319,7 @@
<%= wikitoolbar_for 'course_description' %>
<% @course.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :course, value %></p>
<p><%= custom_field_tag_with_label :course, value %></p>
<% end %>
<%= call_hook(:view_courses_form, :course => @course, :form => f) %>
@ -319,8 +328,8 @@
<!--[eoform:course]-->
<% unless @course.extra_frozen? %>
<% content_for :header_tags do %>
<%= javascript_include_tag 'course_identifier' %>
<% end %>
<% content_for :header_tags do %>
<%= javascript_include_tag 'course_identifier' %>
<% end %>
<% end %>

View File

@ -28,7 +28,7 @@
<% end %>
<% if @issue.safe_attribute? 'description' %>
<p style="margin-left:-10px;">
<p>
<%= f.label_for_field :description, :required => @issue.required_attribute?('description') %>
<%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>

View File

@ -5,14 +5,14 @@
<% end %>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p>
<p style="margin-left:-10px;padding-right: 20px;">
<p style="padding-right: 20px;">
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
</p><!--by young-->
<p><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<% unless @project.identifier_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p>
<!-- <p style="margin-left:-10px;"><%= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>

View File

@ -43,7 +43,7 @@ class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder
return ''.html_safe if options.delete(:no_label)
text = options[:label].is_a?(Symbol) ? l(options[:label]) : options[:label]
text ||= l(("field_" + field.to_s.gsub(/\_id$/, "")).to_sym)
text += @template.content_tag("span", " *", :class => "required") if options.delete(:required)
text += @template.content_tag("span", "#{options.delete(:required) ? ' *' : '&nbsp;&nbsp;'}".html_safe, :class => "required")
@template.content_tag("label", text.html_safe,
:class => (@object && @object.errors[field].present? ? "error" : nil),
:for => (@object_name.to_s + "_" + field.to_s))