80 lines
3.4 KiB
Plaintext
80 lines
3.4 KiB
Plaintext
<script type="text/javascript">
|
|
function switchTab(ProTag) {
|
|
var display_index = 3 - ProTag;
|
|
document.getElementById("tab" + ProTag).className = "selected";
|
|
document.getElementById("tab" + display_index).className = "";
|
|
document.getElementById("content" + ProTag).style.display = "";
|
|
document.getElementById("content" + display_index).style.display = "none";
|
|
}
|
|
</script>
|
|
|
|
<div class="top-content">
|
|
<table>
|
|
<tr>
|
|
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
|
|
<td style="width: auto; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td style="padding-left: 8px"><a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index'%></a></td>
|
|
<td><p class="top-content-list-homework"><%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %> >
|
|
<span><%= link_to(@homework.bid.courses.first.name.to_s, homework_course_path(@homework.bid.courses.first)) if @homework.bid.courses.first%></span> >
|
|
<%=link_to(@homework.bid.name, respond_path(@homework.bid)) %> > <span><%= link_to "修改作业",edit_homework_attach_path(@homework)%></span></p></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=raw l(:label_edit_homework)%> </p>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li>
|
|
<a id = "tab1" href="#" class = "selected" onclick="switchTab(1);this.blur();return false;">
|
|
<%= l(:label_information_plural) %>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a id="tab2" href="#" onclick="switchTab(2); this.blur(); return false;">
|
|
<%= l(:label_member_plural) %>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="box" id="content1">
|
|
<%= form_for(@homework) do |f|%>
|
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
<strong>标 题:</strong>
|
|
<%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;"%>
|
|
</p>
|
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
<strong style="vertical-align: top">描 述:</strong>
|
|
<span style="margin-left:-10px;padding-right: 20px;">
|
|
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
|
</span>
|
|
</p>
|
|
<p style="padding-left: 60px">
|
|
<fieldset style="text-align: left;">
|
|
<p style="padding-left: 60px">
|
|
<% options = {:author => true, :deletable => attach_delete(@homework)} %>
|
|
<%= render :partial => 'attachments/links',
|
|
:locals => {:attachments => @homework.attachments, :options => options} %>
|
|
</p>
|
|
<legend>
|
|
<%= l(:label_attachment_plural) %>
|
|
</legend>
|
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
<%= render :partial => 'attachments/form' %>
|
|
</p>
|
|
</fieldset>
|
|
</p>
|
|
<p style="padding-left: 60px;padding-top: 10px;">
|
|
<span >
|
|
<%= submit_tag t(:label_button_ok), :sta => 0, :class => "enterprise"%>
|
|
</span>
|
|
</p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div id="content2" style="display: none" >
|
|
<%= render :partial => "homework_member",:locals => {:members => @members,:hoemwork_users =>@hoemwork_users,:homework => @homework} %>
|
|
</div>
|