课程里面添加了图片上传功能
This commit is contained in:
parent
8a37f924f9
commit
b113719b46
|
@ -38,9 +38,8 @@
|
||||||
<% @course = Course.find_by_extra(@project.identifier)%>
|
<% @course = Course.find_by_extra(@project.identifier)%>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <% if(@project.project_type==1)%>
|
<td><% if(@project.project_type==1) %>
|
||||||
|
<% if get_avatar?(@project) %>
|
||||||
<% if get_avatar?(@project)%>
|
|
||||||
<%= link_to image_tag(url_to_avatar(@project), :class => "avatar2"), project_path(@project) %>
|
<%= link_to image_tag(url_to_avatar(@project), :class => "avatar2"), project_path(@project) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to image_tag('../images/avatars/Project/course.jpg', :class => "avatar2"), project_path(@project)%>
|
<%= link_to image_tag('../images/avatars/Project/course.jpg', :class => "avatar2"), project_path(@project)%>
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
|
|
||||||
|
|
||||||
<!--[form:project]-->
|
<!--[form:project]-->
|
||||||
|
<% unless @project.new_record? %>
|
||||||
|
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></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 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><!--by young-->
|
<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><!--by young-->
|
||||||
|
|
Loading…
Reference in New Issue