diff --git a/app/views/layouts/_syllabus_eng_name.html.erb b/app/views/layouts/_syllabus_eng_name.html.erb index 959e28bb7..82114f86f 100644 --- a/app/views/layouts/_syllabus_eng_name.html.erb +++ b/app/views/layouts/_syllabus_eng_name.html.erb @@ -1,9 +1,9 @@

<% if syllabus.eng_name && !syllabus.eng_name.empty? %> <%=syllabus.eng_name %> <% else%> - 课程英文名称 + <% end %> <% if User.current == syllabus.user || User.current.admin? %> - <%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_ng_name_png", :style => "width:15px; position:absolute; right: -20px; top: 5px;", :class => "none", :onclick => "show_edit_eng_name('#{syllabus.eng_name}');"%> + <%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_ng_name_png", :style => "width:15px; position:absolute; right: -20px; top: 5px;", :class => "none", :onclick => "show_edit_eng_name('#{syllabus.eng_name}');", :title => '编辑课程英文名称'%> <% end %>

\ No newline at end of file diff --git a/app/views/layouts/_syllabus_info.html.erb b/app/views/layouts/_syllabus_info.html.erb index a52b05228..0ab6ecc68 100644 --- a/app/views/layouts/_syllabus_info.html.erb +++ b/app/views/layouts/_syllabus_info.html.erb @@ -6,4 +6,4 @@
<%= render :partial => 'layouts/syllabus_eng_name', :locals => {:syllabus => @syllabus}%>
- + \ No newline at end of file diff --git a/app/views/layouts/_syllabus_title.html.erb b/app/views/layouts/_syllabus_title.html.erb index 6407a19a2..1f24fcf26 100644 --- a/app/views/layouts/_syllabus_title.html.erb +++ b/app/views/layouts/_syllabus_title.html.erb @@ -1,5 +1,6 @@ -

课程名称:<%=syllabus.title %> +

+ <%=syllabus.title %> <% if User.current == syllabus.user || User.current.admin? %> - <%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_title_png", :class => "none", :style => "width:15px; position:absolute; right: -20px; top: 15px;", :onclick => "show_edit_title('#{syllabus.title}');"%> + <%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_title_png", :class => "none", :style => "width:15px; position:absolute; right: -20px; top: 15px;", :onclick => "show_edit_title('#{syllabus.title}');", :title => '编辑课程名称'%> <% end %>

diff --git a/app/views/syllabuses/edit_syllabus_eng_name.js.erb b/app/views/syllabuses/edit_syllabus_eng_name.js.erb index 8a4c1efa8..129683d4f 100644 --- a/app/views/syllabuses/edit_syllabus_eng_name.js.erb +++ b/app/views/syllabuses/edit_syllabus_eng_name.js.erb @@ -1,3 +1,4 @@ $("#syllabus_eng_name_show").html("<%= escape_javascript render :partial => 'layouts/syllabus_eng_name', :locals => {:syllabus => @syllabus} %>"); $("#syllabus_eng_name_show").show(); +$("#syllabus_edit_ng_name_png").show(); $("#syllabus_eng_name_edit").hide(); \ No newline at end of file