diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index 2b7578a96..29033ec59 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -23,12 +23,16 @@ <%= error_messages_for 'bid' %>

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :onblur => "regexName();" %> -

-

+

+ +

-

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>

-

<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;", :readonly => true, :onchange => "regexDeadLine();") %> +

+ <%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %> +

+

+ <%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;", :readonly => true, :onchange => "regexDeadLine();") %> <%= calendar_for('bid_deadline')%> @@ -43,6 +47,10 @@ <%= hidden_field_tag 'course_id', @course.id %>

- <%= l(:label_attachment_plural) %> -

<%= render :partial => 'attachments/form', :locals => {:container => @bid} %>

+ + <%= l(:label_attachment_plural) %> + +

+ <%= render :partial => 'attachments/form', :locals => {:container => @bid} %> +

\ No newline at end of file diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb index 646deb16e..7d1171116 100644 --- a/app/views/courses/_homework_form.html.erb +++ b/app/views/courses/_homework_form.html.erb @@ -22,28 +22,39 @@ <%= error_messages_for 'bid' %>

- <%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :onblur => "regexName();" %> + <%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", + :maxlength => Bid::NAME_LENGTH_LIMIT, + :onblur => "regexName();" %>

-

+

+ +

-

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>

- +

+ <%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;", + :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %> +

<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %>

<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %> <%= calendar_for('bid_deadline')%>

-

<%= f.select :is_evaluation, is_evaluation_option %> +

+ <%= f.select :is_evaluation, is_evaluation_option %>

-

<%= f.select :proportion, proportion_option %> +

+ <%= f.select :proportion, proportion_option %>

-

<%= hidden_field_tag 'course_id', @course.id %> +

+ <%= hidden_field_tag 'course_id', @course.id %>

-
<%= l(:label_attachment_plural) %> -

<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>

+
+ + <%= l(:label_attachment_plural) %> + +

+ <%= render :partial => 'attachments/form', :locals => {:container => @homework} %> +

\ No newline at end of file diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index edc90f8cc..b7b832fb5 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -6,7 +6,9 @@ - <%= h html_title %> + + <%= h html_title %> + <%= csrf_meta_tag %> @@ -32,7 +34,11 @@ - + - - + +
高校课程实践社区<%= l(:label_user_location) %> : + + <%= l(:label_user_location) %> : + +
<%= link_to request.host()+"/course", :controller => 'courses', :action => 'index' %>

<%= link_to "主页", home_path %> - > <%= link_to l(:label_course_all), :controller => 'courses', :action => 'index' %> - > <%= link_to @course.name, nil %>

+ <%= link_to request.host()+"/course", :controller => 'courses', :action => 'index' %> + +

+ <%= link_to "主页", home_path %> + > <%= link_to l(:label_course_all), :controller => 'courses', :action => 'index' %> + > <%= link_to @course.name, nil %> +

+
@@ -67,7 +79,9 @@ - + - + -
<%= link_to @course.name,course_path(@course) %> + <%= link_to @course.name,course_path(@course) %> +
@@ -101,17 +115,23 @@ <% if User.current.member_of_course?(@course) %> <%= link_to "#{teacherCount(@course)}", course_member_path(@course, :role => 1), :course => '1' %> <% else %> - <%= teacherCount(@course)%> + + <%= teacherCount(@course)%> + <% end%> <% if User.current.member_of_course?(@course) %> <%= link_to "#{studentCount(@course)}", course_member_path(@course, :role => 2), :course => '1' %> <% else %> - <%= studentCount(@course)%> + + <%= studentCount(@course)%> + <% end %> <%= link_to files_count, course_files_path(@course) %> + <%= link_to files_count, course_files_path(@course) %> +
<%= l(:label_x_base_courses_teacher, :count => teacherCount(@course)) %> @@ -122,7 +142,6 @@ <%= l(:label_x_course_data, :count => files_count) %>
@@ -134,45 +153,74 @@ - <%= l(:label_main_teacher) %> : - <%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %> + + <%= l(:label_main_teacher) %> : + + + <%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %> + - - <%= l(:label_setup_time) %> : - <%= @course.setup_time %> + + <%= l(:label_setup_time) %> : + + + <%= @course.setup_time %> + - <%= l(:label_endup_time) %> : - <%= @course.endup_time %> + + <%= l(:label_endup_time) %> : + + + <%= @course.endup_time %> + - <%= l(:label_class_period) %> : - <%= @course.class_period %> <%= l(:label_class_hour) %> + + <%= l(:label_class_period) %> : + + + <%= @course.class_period %>  + <%= l(:label_class_hour) %> + - <%= l(:label_main_term) %> : - <%= @course.time %> <%= @course.term %> + + <%= l(:label_main_term) %> : + + + <%= @course.time %> + <%= @course.term %> + <% unless @course.teacher.user_extensions.nil? || @course.teacher.user_extensions.school.nil? %> - <%= l(:label_teacher_work_unit) %> : - <%= @course.teacher.user_extensions.school %> + + <%= l(:label_teacher_work_unit) %> : + + + + <%= @course.teacher.user_extensions.school %> + + <% else %> - <%= l(:label_teacher_work_unit) %> : - <%= l(:field_course_un) %> + + <%= l(:label_teacher_work_unit) %> : + + + <%= l(:field_course_un) %> + <% end %> - -
@@ -180,11 +228,9 @@
<%= l(:label_new_course_description) %>
-
<% if @course.description && !@course.description.blank? %>
- <%= textilizable @course.description %>
<% else %> @@ -193,7 +239,10 @@
<% end %>
- <%= l(:label_create_time) %>:<%= format_time(@course.created_at) %> + + <%= l(:label_create_time) %>: + + <%= format_time(@course.created_at) %>
@@ -233,10 +282,6 @@
  • <%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => link_class(:feedback) %>
  • - - <% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where('id = ? or id = ?', 7, 9)).size >0)) %> - - <% end %> <%= render_flash_messages %> @@ -250,7 +295,9 @@ <%= render :partial => 'layouts/base_footer' %> diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 7808f268e..92d2cc84e 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -8,7 +8,9 @@ - <%=h html_title %> + + <%=h html_title %> + <%= csrf_meta_tag %> <%= favicon %> @@ -124,7 +126,9 @@ - <%= l(:lable_course_teacher) %> : + + <%= l(:lable_course_teacher) %> : + <%= link_to(course.teacher.lastname+course.teacher.firstname, user_path(course.teacher)) %> @@ -141,8 +145,13 @@ - <%= l(:label_main_term) %> : - <%= course.time.to_s %> <%= course.term %> + + <%= l(:label_main_term) %> : + + + <%= course.time.to_s %> + <%= course.term %> +