diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb
index 9112e7ec5..6b0064036 100644
--- a/app/api/mobile/entities/user.rb
+++ b/app/api/mobile/entities/user.rb
@@ -34,6 +34,8 @@ module Mobile
user_expose :img_url
#昵称
expose :nickname
+ #真名
+ expose :realname
#性别
user_expose :gender
#我的二维码
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index f1c9451bf..253faa2b1 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -224,12 +224,14 @@ class TagsController < ApplicationController
if @obj && @object_flag == '6' && @obj.container.kind_of?(Course)
@course = @obj.container
@tag_list = get_course_tag_list @course
+ @select_tag_name = params[:select_tag_name]
end
# end
end
end
def tag_save
+ @select_tag_name = params[:tag_for_save][:tag_name]
@tags = params[:tag_for_save][:name]
@obj_id = params[:tag_for_save][:object_id]
@obj_flag = params[:tag_for_save][:object_flag]
diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb
index 6f207d76d..e91883bee 100644
--- a/app/services/courses_service.rb
+++ b/app/services/courses_service.rb
@@ -40,9 +40,9 @@ class CoursesService
end
@courses = courses_all.visible(current_user)
if params[:name].present?
- @courses_all = @courses.like(params[:name])
+ @courses_all = @courses.like(params[:name]).order("created_at desc")
else
- @courses_all = @courses;
+ @courses_all = @courses.order("created_at desc");
end
@courses_all
course_list = []
diff --git a/app/services/users_service.rb b/app/services/users_service.rb
index 63dd725cd..c1f716fd1 100644
--- a/app/services/users_service.rb
+++ b/app/services/users_service.rb
@@ -77,7 +77,7 @@ class UsersService
gender = @user.user_extensions.gender.nil? ? 0 : @user.user_extensions.gender
work_unit = get_user_work_unit @user
location = get_user_location @user
- {:id => @user.id, :img_url => img_url, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction}
+ {:id => @user.id, :img_url => img_url,:realname => @user.realname, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction}
end
#忘记密码
diff --git a/app/views/files/_course_list.html.erb b/app/views/files/_course_list.html.erb
index c726d63e7..42f51e07a 100644
--- a/app/views/files/_course_list.html.erb
+++ b/app/views/files/_course_list.html.erb
@@ -16,7 +16,7 @@
- <%= render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => course}%>
+ <%= render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => course,:tag_name => @tag_name}%>
@@ -52,8 +52,8 @@
- <%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %>
- <%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6"} %>
+ <%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %>
+ <%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %>
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index f78ea6cdf..c9ac1999f 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -1,5 +1,9 @@
<% unless tag_list.nil?%>
<% tag_list.each do |k,v|%>
- <%= k%>(<%= v%>)
+ <% if tag_name && tag_name == k%>
+ <%= k%>(<%= v%>)
+ <% else%>
+ <%= k%>(<%= v%>)
+ <% end%>
<% end%>
<% end%>
\ 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 dec4a5f4d..dc384834c 100644
--- a/app/views/layouts/base_courses.html.erb
+++ b/app/views/layouts/base_courses.html.erb
@@ -35,7 +35,7 @@
<%= l(:label_courses_community)%>
-
+
<%= l(:label_user_location) %> :
<%= link_to l(:field_homepage), home_path %>
>
@@ -80,7 +80,7 @@
-
+
<%= @course.name %>
<% if @course.is_public == 0%>
diff --git a/app/views/tags/_tag_add.html.erb b/app/views/tags/_tag_add.html.erb
index f8cac7c0d..ad97cd693 100644
--- a/app/views/tags/_tag_add.html.erb
+++ b/app/views/tags/_tag_add.html.erb
@@ -9,6 +9,8 @@
<%= f.text_field :name ,:id => "tags_name_#{obj.id}",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class => "isTxt w90 f_l" %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
+ <% tag_name ||= ""%>
+ <%= f.text_field :tag_name,:value=> tag_name,:style=>"display:none"%>
<%= f.submit "",:class => "submit f_l" %>
<% end %>
diff --git a/app/views/tags/_tag_list.html.erb b/app/views/tags/_tag_list.html.erb
index e18dafd7d..b512f1ef3 100644
--- a/app/views/tags/_tag_list.html.erb
+++ b/app/views/tags/_tag_list.html.erb
@@ -12,8 +12,9 @@
<% end %>
<% when '6' %>
<% if obj.author_id == User.current.id || User.current.admin?%>
+ <% select_tag_name ||= ""%>
<%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag,
- :taggable_id => obj.id, :taggable_type => object_flag %>
+ :taggable_id => obj.id, :taggable_type => object_flag, :select_tag_name => select_tag_name %>
<% end %>
<% end %>
diff --git a/app/views/tags/_tag_new.html.erb b/app/views/tags/_tag_new.html.erb
index 0d5d371e3..bbedaff78 100644
--- a/app/views/tags/_tag_new.html.erb
+++ b/app/views/tags/_tag_new.html.erb
@@ -21,7 +21,8 @@
<% elsif object_flag == '6' %>
- <%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag} %>
+ <% tag_name ||= ""%>
+ <%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag,:select_tag_name => tag_name} %>
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
diff --git a/app/views/tags/remove_tag_new.js.erb b/app/views/tags/remove_tag_new.js.erb
index 35361fc7d..9a43dd9b4 100644
--- a/app/views/tags/remove_tag_new.js.erb
+++ b/app/views/tags/remove_tag_new.js.erb
@@ -2,9 +2,9 @@
<% if @object_flag == "6"%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
- :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag,:select_tag_name => @select_tag_name}) %>');
-$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course}) %>");
+$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>");
<% end %>
<% if @object_flag == "10"%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
diff --git a/app/views/tags/tag_save.js.erb b/app/views/tags/tag_save.js.erb
index 2c0c398f4..74a38c99d 100644
--- a/app/views/tags/tag_save.js.erb
+++ b/app/views/tags/tag_save.js.erb
@@ -8,8 +8,8 @@ $('#name-issue').val("");
<%if @course%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
- :locals => {:obj => @obj,:object_flag => @obj_flag}) %>');
- $("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course}) %>");
+ :locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
+ $("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>");
<%else%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name',
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index b42efdabd..4b6b681c7 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -641,7 +641,6 @@ span.forums-avatar-right{
/*added by bai*/
.user_underlinescore{
margin: 1px;
- padding: 1px;
width:700px;
height:1px;
background-color:#15bccf;
@@ -1106,7 +1105,6 @@ ul.user_course_sort li{list-style-type:none;
}
.user_underline{
margin:1px;
- padding:1px;
width:240px;
height:1px;
background-color:#15bccf;
@@ -1126,7 +1124,6 @@ ul.user_course_sort li{list-style-type:none;
.user_underline2{
margin:1px;
- padding:1px;
width:240px;
height:1px;
background-color:#c6e9fe;
@@ -1134,7 +1131,6 @@ ul.user_course_sort li{list-style-type:none;
}
.user_underline3{
margin: 1px;
- padding:1px;
width:120px;
height:1px;
background-color:#c6e9fe;
@@ -1143,7 +1139,6 @@ ul.user_course_sort li{list-style-type:none;
}
.homepage_underline{
margin:1px;
- padding:1px;
width:240px;
height:1px;
background-color:#c6e9fe;
@@ -3063,7 +3058,6 @@ div.repos_explain{
/* new linchun compitition */
.contest_underline{
margin:1px;
- padding:1px;
width:900px;
height:0.5px;
background-color:#aaa;
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 45568c913..9d714b1de 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -279,6 +279,7 @@ a:hover.close_btn {background-position:-66px 0;}
.show_btn {background-position:-119px 0;}
.msgserver a {color:#15bccf; }
.break_word{word-break: break-all;word-wrap: break-word;}
+.hiddent{ overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}