-
-
- <%= link_to request.host()+"/contests", contests_path %>
-
-
- |
<%=link_to l(:field_homepage), home_path %> >
<%= l(:label_contest_innovate) %>
@@ -43,14 +65,14 @@
<% end %>
<% if @contests.size > 0%>
- <%= sort_contest(@s_state)%>
+ <%#= sort_contest(@s_state)%>
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
<% elsif @is_search%>
<%= render :partial => "layouts/no_content"%>
<% else %>
- <%= sort_contest(@s_state)%>
+ <%#= sort_contest(@s_state)%>
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
diff --git a/app/views/courses/_groups_name.html.erb b/app/views/courses/_groups_name.html.erb
index ca0fed9c2..e1b138666 100644
--- a/app/views/courses/_groups_name.html.erb
+++ b/app/views/courses/_groups_name.html.erb
@@ -20,7 +20,7 @@
%>
<% end %>
<% if @canShowCode %>
-
+
<% end %>
@@ -36,7 +36,7 @@
<% end %>
<% if @canShowCode %>
- +添加分班
+ +添加分班
@@ -44,7 +44,7 @@
<%= text_field_tag "group_name", params[:group_name], size: "20", class: "isTxt w90 f_l", style: "padding: 0px", maxlength: "100" %>
<%= submit_tag '', class: "submit f_l",:onclick => "validate_add_group()", style: "width: 43px;height: 21px;background: url(/images/btn.png) no-repeat 0 0;" %>
- <%= link_to_function '', "$('#add_tag04').slideToggle();", class: "submit_2", style: "width: 43px"%>
+ <%= link_to_function '', "document.getElementById('group_name').value='';$('#add_tag04').slideToggle();", class: "submit_2", style: "width: 43px"%>
<% end %>
diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb
index 58a0da0b2..2800c78ea 100644
--- a/app/views/courses/_member_list.html.erb
+++ b/app/views/courses/_member_list.html.erb
@@ -1,4 +1,4 @@
-
+
<% if User.current.logged? && User.current.member_of_course?(@course) && @group %>
<% if !@canShowCode %>
<%= join_in_course_group(@course.course_groups,@group, User.current) %>
@@ -26,31 +26,66 @@
<% if @result_count %>
<%= l(:label_search_member_count) %><%= @result_count %><%= l(:label_member_people) %>
<% end %>
- <% members.each do |member| %>
-
+
+
+
+ <% if @subPage_title == l(:label_student_list) %>
+ - 作业积分
+ - 加入时间
+ <% else %>
+ - 加入时间
+ <% end %>
+
+
+ <% members.each do |member| %>
+
+
+
<% next if member.new_record? %>
- <% unless member.created_on.nil? %>
- <%= content_tag "p", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
- <% end %>
- <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :class => 'avatar')) %>
+
+ <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %>
+
<% if @canShowCode %>
- <%= content_tag "div", link_to(member.user.show_name, user_path(member.user)), :class => "nomargin avatar_name" %>
+ -
+ <%= l(:label_bidding_user_studentname) %> :
+ <%= link_to member.user.show_name, user_path(member.user) %>
+
+
+ <%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
- <%= content_tag "div", link_to(member.user.name, user_path(member.user)), :class => "nomargin avatar_name" %>
+ <%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
<% end %>
- <% if @canShowCode %>
- <%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
+ <% if @canShowCode %>
+ -
+ <%= l(:label_bidding_user_studentcode) %> :
+ <%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
+
+ <%#= content_tag "li", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :style=> "color:#1c9ec7;" %>
<% end %>
-
+
+ <% if @subPage_title == l(:label_student_list) %>
+ <%= link_to member.student_homework_score[1].to_s, {
+ :action => 'show_member_score',
+ :member_id => member.id,
+ :remote => true},
+ :class => 'ml258 c_red', :style => "color:red;" %>
+
+ <% unless member.created_on.nil? %>
+ <%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey" %>
+ <% end %>
+ <% else %>
+ <% unless member.created_on.nil? %>
+ <%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey", :style=>"margin-left:195px" %>
+ <% end %>
+ <% end %>
+
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
<% end; reset_cycle %>
+
<% else %>
diff --git a/app/views/courses/_show_member_score.html.erb b/app/views/courses/_show_member_score.html.erb
new file mode 100644
index 000000000..57dd7b2be
--- /dev/null
+++ b/app/views/courses/_show_member_score.html.erb
@@ -0,0 +1,58 @@
+
+
+
+
+ <%= @member_score.user.name %> 历次作业积分
+
+ - 作业名称得分
+ <% @member_score.student_homework_score[0].each do |homework_score| %>
+ <% if !homework_score.t_score.nil? && homework_score.t_score != 0 %>
+ <% score = homework_score.t_score %>
+ <% else %>
+ <% if !homework_score.s_score.nil? %>
+ <% score = homework_score.s_score %>
+ <% else %>
+ <% score = 0 %>
+ <% end %>
+ <% end %>
+ - <%= homework_score.name %><%= format("%0.2f",score) %>
+ <% end %>
+ - 作业积分(总得分)<%= @member_score.student_homework_score[1] %>
+
+
+
+
diff --git a/app/views/courses/show_member_score.js.erb b/app/views/courses/show_member_score.js.erb
new file mode 100644
index 000000000..fe8d52a2b
--- /dev/null
+++ b/app/views/courses/show_member_score.js.erb
@@ -0,0 +1,3 @@
+$('#ajax-modal').html('<%= escape_javascript(render :partial => 'courses/show_member_score', :locals => {:member => @member_score}) %>');
+showModal('ajax-modal', '400px');
+$('#ajax-modal').addClass('new-watcher');
diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb
index f52b7d353..e2f928332 100644
--- a/app/views/files/_project_file.html.erb
+++ b/app/views/files/_project_file.html.erb
@@ -2,22 +2,21 @@
<% attachmenttypes = @project.attachmenttypes %>
<% sufixtypes = @project.contenttypes %>
- <%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区
+
+ <%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>
+ 资源共享区
+
-
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @project) %>
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %>
-
-
<%= render :partial => 'new', locals: {project: @project} %>
-
-
+
<% if attachmenttypes.any? %>
-
- <%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName",params[:type]),
+
+ <%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName",params[:type]),
:onchange => "attachmenttypes_searchex(this.value)" %>
<% end %>
<% if sufixtypes.any? %>
-
+
<%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes),
:onchange => "attachment_contenttypes_searchex(this.value)" %>
<% end %>
@@ -65,20 +71,14 @@
<%= javascript_tag "observeSearchfield('attach_search', null, '#{ escape_javascript attachments_autocomplete_path(:project_id => @project.id, :format => 'js') }')" %>
-
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
<%#= render :partial => 'show_all_attachment' %>
<% if (@attachtype==0 && @contenttype=='0') || (@attachtype.nil? && @contenttype.nil?) %>
-
- <%= render partial: "show_all_attachment"%>
-
-
+ <%= render partial: "show_all_attachment"%>
<%else%>
-
- <%= render partial: "sort_by_attachtypel"%>
-
+ <%= render partial: "sort_by_attachtypel"%>
<%end%>
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index 39fd3776f..58960df4c 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -1,67 +1,69 @@
\ No newline at end of file
diff --git a/app/views/layouts/_base_softapplication_top_content.html.erb b/app/views/layouts/_base_softapplication_top_content.html.erb
index afa2e1d29..46d45c903 100644
--- a/app/views/layouts/_base_softapplication_top_content.html.erb
+++ b/app/views/layouts/_base_softapplication_top_content.html.erb
@@ -17,7 +17,8 @@
<%=link_to l(:field_homepage), home_path %> >
<%= l(:label_contest_innovate) %>
- <% contest = @softapplication.contests.first %><%= contest ? link_to(contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%>
+ <% contest = @softapplication.contests.first %>
+ <%= contest ? link_to(">" + contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%>
|
diff --git a/app/views/layouts/contest_base.html.erb b/app/views/layouts/contest_base.html.erb
index ba187be3e..98663f6c4 100644
--- a/app/views/layouts/contest_base.html.erb
+++ b/app/views/layouts/contest_base.html.erb
@@ -30,7 +30,7 @@
<%= render_flash_messages %>
<%= yield %>
- <%= call_hook :view_layouts_base_content %>
+ <%= call_hook :view_layouts_base_course %>
<%=render :partial => 'layouts/base_footer'%>
diff --git a/app/views/layouts/course_base.html.erb b/app/views/layouts/course_base.html.erb
index 198252a52..af376b1f5 100644
--- a/app/views/layouts/course_base.html.erb
+++ b/app/views/layouts/course_base.html.erb
@@ -1,7 +1,5 @@
-<% @nav_dispaly_course_all_label = 1
- @nav_dispaly_forum_label = 1
- @nav_dispaly_course_label = nil
- @nav_dispaly_store_all_label = 1 %>
+<% @nav_dispaly_project_label = 1
+ @nav_dispaly_forum_label = 1 %>
diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb
index c50bd5dff..d656af555 100644
--- a/app/views/messages/edit.html.erb
+++ b/app/views/messages/edit.html.erb
@@ -15,7 +15,7 @@
} do |f| %>
<%= render :partial => 'form',
:locals => {:f => f, :replying => !@message.parent.nil?} %>
-
+
<%= l(:button_save) %>
<%= link_to l(:button_cancel), board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)), :class => "ButtonColor m3p10" %>
diff --git a/app/views/messages/new.html.erb b/app/views/messages/new.html.erb
index 202634238..04ea99745 100644
--- a/app/views/messages/new.html.erb
+++ b/app/views/messages/new.html.erb
@@ -1,7 +1,15 @@
<% if @project %>
- <%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %>
+
+ <%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %>
+ »
+ <%= l(:label_message_new) %>
+
<% elsif @course %>
- <%= link_to h(@board.name), :controller => 'boards', :action => 'show', :course_id => @course, :id => @board %> » <%= l(:label_message_new) %>
+
+ <%= link_to h(@board.name), :controller => 'boards', :action => 'show', :course_id => @course, :id => @board %>
+ »
+ <%= l(:label_message_new) %>
+
<% end %>
<%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
diff --git a/app/views/projects/show_projects_score.html.erb b/app/views/projects/show_projects_score.html.erb
deleted file mode 100644
index 836e0a05c..000000000
--- a/app/views/projects/show_projects_score.html.erb
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
- <%= h html_title %>
-
-
- <%= csrf_meta_tag %>
- <%= favicon %>
- <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
- <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
- <%= javascript_heads %>
- <%= heads_for_theme %>
- <%= hubspot_head %>
- <%= call_hook :view_layouts_base_html_head %>
-
- <%= yield :header_tags -%>
-
-<% if @project %>
-<%= l(:label_projects_score) %>
-
-
-
- <%= image_tag(url_to_avatar(@project), :class => 'avatar2') %> |
-
-
- <%= @project.name %> |
-
-
- |
-
-
- <%= l(:label_projects_score) %> |
- <%= format("%.2f" , project_scores(@project) ).to_i %> |
-
- |
-
-
-
-
-
-
- -
- <%= link_to l(:label_projects_score), {:controller => 'projects', :action => 'show_projects_score', :remote => true}%> :
- <%= format("%.2f" , project_scores(@project) ).to_i %>
-
- -
- <%= link_to l(:label_issue_score), {:controller => 'projects', :action => 'issue_score_index', :remote => true}%> :
- <%= format("%.2f" , issue_score(@project)).to_i %>
-
- -
- <%= link_to l(:label_news_score), {:controller => 'projects', :action => 'news_score_index', :remote => true}%> :
- <%= format("%.2f" , news_score(@project)).to_i %>
-
- -
- <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> :
- <%= format("%.2f" , documents_score(@project)).to_i %>
-
- -
- <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> :
- <%= format("%.2f" , changesets_score(@project)).to_i %>
-
- -
- <%= link_to l(:label_topic_score), {:controller => 'projects', :action => 'projects_topic_score_index', :remote => true}%> :
- <%= format("%.2f" , board_message_score(@project)).to_i %>
-
-
-
-
- <%= render :partial => 'projects/project_score_index', :locals => {:index => 0,:project => @project } %>
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb
index 7a2edfa1f..77cc6aa71 100644
--- a/app/views/softapplications/show.html.erb
+++ b/app/views/softapplications/show.html.erb
@@ -1,4 +1,5 @@
<%= render :partial => 'layouts/base_softapplication_top_content' %>
+<% html_title(@softapplication.name) -%>
@@ -47,8 +48,9 @@
|
- <% if @project %>
- <%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %>
+ <% if @softapplication.project %>
+ <%=l(:label_attendingcontestwork_deposit_project)%>:
+ <%= link_to "#{@softapplication.project}", project_path(@softapplication.project) %>
<% end %>
|
diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb
index 06680d373..c08a3b553 100644
--- a/app/views/tags/_tag.html.erb
+++ b/app/views/tags/_tag.html.erb
@@ -1,6 +1,6 @@
<%#begin
- 1 代表是user类型
+ 1 代表是user类型
2 代表是project类型
3 代表是issue类型
4 代表是bid类型
@@ -44,14 +44,14 @@
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);',
:class => "tags_icona",
- :onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').slideToggle(); readmore(this);" if User.current.logged? %>
+ :onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %>
<%#= toggle_link (image_tag "/images/sidebar/add.png"), "put-tag-form-#{obj.class}-#{obj.id}", {:focus => "put-tag-form-#{obj.class}-#{obj.id} #name"} if User.current.logged? %>
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
-
+
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
<% else %>
diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb
index 3efbfcc1a..d1b3060f9 100644
--- a/app/views/tags/_tag_name.html.erb
+++ b/app/views/tags/_tag_name.html.erb
@@ -9,108 +9,103 @@
<% @tags = obj.reload.tag_list %>
-
<% if non_list_all and (@tags.size > 0) %>
<% if @tags.size > Setting.show_tags_length.to_i then %>
<% i = 0 %>
-
<% until i>Setting.show_tags_length.to_i do %>
<%= link_to @tags[i], :controller => "tags", :action => "index", :q => @tags[i], :object_flag => object_flag, :obj_id => obj.id %>
<% i += 1 %>
<% end %>
-
<%= more_tags(obj.id,object_flag)%>
-
<% else %>
-
<% @tags.each do |tag| %>
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<% end %>
-
<% end %>
-
<% else %>
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
- <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
-
- <% case object_flag %>
- <% when '1' %>
-
- <% if User.current.eql?(obj) %>
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
- <% end %>
-
- <% when '2' %>
-
- <% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
- <% end %>
-
- <% when '3' %>
-
- <% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
- <% end %>
-
- <% when '4' %>
- <% if obj.author_id == User.current.id %>
-
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
-
- <% end %>
- <% when '5' %>
- <% test = Forum.find(obj.id) %>
- <% if test && test.creator_id == User.current.id %>
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
-
- <% end %>
- <% when '6' %>
- <%# if (User.current.logged? &&
- User.current.admin?
- # && (@project && User.current.member_of?(@project))
- )
- %>
- <% if obj.author_id == User.current.id || User.current.admin?%>
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
- <% end %>
- <% when '7' %>
- <% if obj.author_id == User.current.id %>
-
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
-
- <% end %>
- <% when '9' %>
-
- <% if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %>
- <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
- <% end %>
- <% end %>
-
-
-
-
+
+ <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
+
+ <% case object_flag %>
+ <% when '1' %>
+ <% if User.current.eql?(obj) %>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% when '2' %>
+ <% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% when '3' %>
+ <% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% when '4' %>
+ <% if obj.author_id == User.current.id %>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% when '5' %>
+ <% test = Forum.find(obj.id) %>
+ <% if test && test.creator_id == User.current.id %>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% when '6' %>
+ <%# if (User.current.logged? &&
+ User.current.admin?
+ # && (@project && User.current.member_of?(@project))
+ )
+ %>
+ <% if obj.author_id == User.current.id || User.current.admin?%>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% when '7' %>
+ <% if obj.author_id == User.current.id %>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% when '9' %>
+ <% if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %>
+
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+
+ <% end %>
+ <% end %>
+
<% end %>
<% else %>
- <%= l(:label_tags_no) %>
-
+
+ <%= l(:label_tags_no) %>
+
<% end %>
-
<% end %>
\ No newline at end of file
diff --git a/app/views/users/_course_form.html.erb b/app/views/users/_course_form.html.erb
index 6784faf89..02ba782ec 100644
--- a/app/views/users/_course_form.html.erb
+++ b/app/views/users/_course_form.html.erb
@@ -4,31 +4,40 @@
- <%= image_tag(url_to_avatar(membership.course), :class => 'avatar') %> |
+
+ <%= image_tag(url_to_avatar(membership.course), :class => 'avatar') %>
+ |
- <%= link_to_course(membership.course) %>
+
+ <%= link_to_course(membership.course) %>
+
<%= render :partial => 'courses/set_course_time', :locals => {:course => membership.course} %>
- <% if User.current == @user %>
- <% (membership.roles).each do |role| %>
- <% unless (role == Role.find(9) || role == Role.find(3)) %>
- <%= join_in_course(membership.course, User.current) %>
- <% end %>
- <% end %>
- <% else %>
+ <% if (User.current == @user && (!@user.allowed_to?(:as_teacher,membership.course)))%>
+ <%= join_in_course(membership.course, User.current) %>
<% end %>
+
<%= l(:label_x_base_courses_member, :count => membership.course.members.count) %>
- (<%= "#{membership.course.members.count}" %>)
+ (<%= "#{membership.course.members.count}" %>)
+
<%= l(:label_homework) %>
- (<%= link_to (membership.course.homeworks.count), {:controller => 'courses', :action => 'homework', :id => membership.course.id} %>)
+ (
+
+ <%= link_to (membership.course.homeworks.count), {:controller => 'courses', :action => 'homework', :id => membership.course.id} %>
+
+ )
<%= l(:label_course_news) %>
- (<%= link_to (membership.course.news.count), {:controller => 'news', :action => 'index', :course_id => membership.course.id} %>)
- |
+ (
+
+ <%= link_to (membership.course.news.count), {:controller => 'news', :action => 'index', :course_id => membership.course.id} %>
+ )
+
+
@@ -42,10 +51,14 @@
<% @course = Course.find_by_extra(membership.course.extra) %>
<% unless (@course.nil? || @course.teacher.nil? || @course.teacher.name.nil?) %>
- <%= l(:label_main_teacher) %>
- : <%= link_to(@course.teacher.realname, user_path(@course.teacher)) %>
- <%= l(:label_course_term) %>
- : <%= @course.time %><%= @course.term %>
+
+ <%= l(:label_main_teacher) %>
+ : <%= link_to(@course.teacher.realname, user_path(@course.teacher)) %>
+
+
+ <%= l(:label_course_term) %>
+ : <%= @course.time %><%= @course.term %>
+
<% end %>
|
diff --git a/app/views/users/_my_joinedcourse.html.erb b/app/views/users/_my_joinedcourse.html.erb
index 74be37b55..8314974d3 100644
--- a/app/views/users/_my_joinedcourse.html.erb
+++ b/app/views/users/_my_joinedcourse.html.erb
@@ -1,15 +1,15 @@
<% if @memberships.empty? %>
<% if @user != User.current %>
-
- <%= l(:label_project_course_un) %>
-
+
+ <%= l(:label_project_course_un) %>
+
<% else %>
-
-
- <%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
- <%= link_to "#{l(:label_course_new)}", {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
-
+
+ <%= l(:label_project_cousre_studentun) %>
+ <%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
+ <%= link_to "#{l(:label_course_new)}", {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
+
<% end %>
<% else %>
|