Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
8b89110e41
|
@ -34,6 +34,8 @@ module Mobile
|
||||||
user_expose :img_url
|
user_expose :img_url
|
||||||
#昵称
|
#昵称
|
||||||
expose :nickname
|
expose :nickname
|
||||||
|
#真名
|
||||||
|
expose :realname
|
||||||
#性别
|
#性别
|
||||||
user_expose :gender
|
user_expose :gender
|
||||||
#我的二维码
|
#我的二维码
|
||||||
|
|
|
@ -224,12 +224,14 @@ class TagsController < ApplicationController
|
||||||
if @obj && @object_flag == '6' && @obj.container.kind_of?(Course)
|
if @obj && @object_flag == '6' && @obj.container.kind_of?(Course)
|
||||||
@course = @obj.container
|
@course = @obj.container
|
||||||
@tag_list = get_course_tag_list @course
|
@tag_list = get_course_tag_list @course
|
||||||
|
@select_tag_name = params[:select_tag_name]
|
||||||
end
|
end
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def tag_save
|
def tag_save
|
||||||
|
@select_tag_name = params[:tag_for_save][:tag_name]
|
||||||
@tags = params[:tag_for_save][:name]
|
@tags = params[:tag_for_save][:name]
|
||||||
@obj_id = params[:tag_for_save][:object_id]
|
@obj_id = params[:tag_for_save][:object_id]
|
||||||
@obj_flag = params[:tag_for_save][:object_flag]
|
@obj_flag = params[:tag_for_save][:object_flag]
|
||||||
|
|
|
@ -40,9 +40,9 @@ class CoursesService
|
||||||
end
|
end
|
||||||
@courses = courses_all.visible(current_user)
|
@courses = courses_all.visible(current_user)
|
||||||
if params[:name].present?
|
if params[:name].present?
|
||||||
@courses_all = @courses.like(params[:name])
|
@courses_all = @courses.like(params[:name]).order("created_at desc")
|
||||||
else
|
else
|
||||||
@courses_all = @courses;
|
@courses_all = @courses.order("created_at desc");
|
||||||
end
|
end
|
||||||
@courses_all
|
@courses_all
|
||||||
course_list = []
|
course_list = []
|
||||||
|
|
|
@ -77,7 +77,7 @@ class UsersService
|
||||||
gender = @user.user_extensions.gender.nil? ? 0 : @user.user_extensions.gender
|
gender = @user.user_extensions.gender.nil? ? 0 : @user.user_extensions.gender
|
||||||
work_unit = get_user_work_unit @user
|
work_unit = get_user_work_unit @user
|
||||||
location = get_user_location @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
|
end
|
||||||
|
|
||||||
#忘记密码
|
#忘记密码
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div class="files_tag" id="files_tag">
|
<div class="files_tag" id="files_tag">
|
||||||
<%= 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}%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="tag_h">
|
<div class="tag_h">
|
||||||
<%= render :partial => 'tags/tag_new', :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"} %>
|
<%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!---re_con_box end-->
|
</div><!---re_con_box end-->
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<% unless tag_list.nil?%>
|
<% unless tag_list.nil?%>
|
||||||
<% tag_list.each do |k,v|%>
|
<% tag_list.each do |k,v|%>
|
||||||
<a href="javascript:void(0);" class="files_tag_icon" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','<%= k%>','<%= @q%>','<%= course.id%>');"><%= k%>(<span class="c_red"><%= v%></span>)</a>
|
<% if tag_name && tag_name == k%>
|
||||||
|
<a href="javascript:void(0);" class="files_tag_icon" style="background: #28be6c;"><%= k%>(<span class="c_red"><%= v%></span>)</a>
|
||||||
|
<% else%>
|
||||||
|
<a href="javascript:void(0);" class="files_tag_icon" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','<%= k%>','<%= @q%>','<%= course.id%>');"><%= k%>(<span class="c_red"><%= v%></span>)</a>
|
||||||
|
<% end%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% end%>
|
<% end%>
|
|
@ -35,7 +35,7 @@
|
||||||
<%= l(:label_courses_community)%>
|
<%= l(:label_courses_community)%>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p class="hiddent">
|
||||||
<%= l(:label_user_location) %> :
|
<%= l(:label_user_location) %> :
|
||||||
<%= link_to l(:field_homepage), home_path %>
|
<%= link_to l(:field_homepage), home_path %>
|
||||||
>
|
>
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div >
|
<div >
|
||||||
<a class="pr_info_name fl c_dark fb" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
|
<a class="pr_info_name fl c_dark fb break_word" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
|
||||||
<%= @course.name %>
|
<%= @course.name %>
|
||||||
<% if @course.is_public == 0%>
|
<% if @course.is_public == 0%>
|
||||||
<span class="img_private ">
|
<span class="img_private ">
|
||||||
|
|
|
@ -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 :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_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
<%= f.text_field :object_flag,:value=> object_flag,: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" %>
|
<%= f.submit "",:class => "submit f_l" %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -12,8 +12,9 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when '6' %>
|
<% when '6' %>
|
||||||
<% if obj.author_id == User.current.id || User.current.admin?%>
|
<% if obj.author_id == User.current.id || User.current.admin?%>
|
||||||
|
<% select_tag_name ||= ""%>
|
||||||
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag,
|
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag,
|
||||||
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
|
:taggable_id => obj.id, :taggable_type => object_flag, :select_tag_name => select_tag_name %> </span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
</div>
|
</div>
|
||||||
<% elsif object_flag == '6' %>
|
<% elsif object_flag == '6' %>
|
||||||
<div id="tags_show-<%=obj.class%>-<%=obj.id%>" style="display:inline; ">
|
<div id="tags_show-<%=obj.class%>-<%=obj.id%>" style="display:inline; ">
|
||||||
<%= 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} %>
|
||||||
</div>
|
</div>
|
||||||
<div id="put-tag-form-<%=obj.class%>-<%=obj.id%>" style="display: none;height: 100px;">
|
<div id="put-tag-form-<%=obj.class%>-<%=obj.id%>" style="display: none;height: 100px;">
|
||||||
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
|
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<% if @object_flag == "6"%>
|
<% if @object_flag == "6"%>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
$("#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 %>
|
<% end %>
|
||||||
<% if @object_flag == "10"%>
|
<% if @object_flag == "10"%>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
|
|
|
@ -8,8 +8,8 @@ $('#name-issue').val("");
|
||||||
<%if @course%>
|
<%if @course%>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||||
:locals => {:obj => @obj,:object_flag => @obj_flag}) %>');
|
: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}) %>");
|
$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>");
|
||||||
<%else%>
|
<%else%>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name',
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name',
|
||||||
|
|
|
@ -641,7 +641,6 @@ span.forums-avatar-right{
|
||||||
/*added by bai*/
|
/*added by bai*/
|
||||||
.user_underlinescore{
|
.user_underlinescore{
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
padding: 1px;
|
|
||||||
width:700px;
|
width:700px;
|
||||||
height:1px;
|
height:1px;
|
||||||
background-color:#15bccf;
|
background-color:#15bccf;
|
||||||
|
@ -1106,7 +1105,6 @@ ul.user_course_sort li{list-style-type:none;
|
||||||
}
|
}
|
||||||
.user_underline{
|
.user_underline{
|
||||||
margin:1px;
|
margin:1px;
|
||||||
padding:1px;
|
|
||||||
width:240px;
|
width:240px;
|
||||||
height:1px;
|
height:1px;
|
||||||
background-color:#15bccf;
|
background-color:#15bccf;
|
||||||
|
@ -1126,7 +1124,6 @@ ul.user_course_sort li{list-style-type:none;
|
||||||
|
|
||||||
.user_underline2{
|
.user_underline2{
|
||||||
margin:1px;
|
margin:1px;
|
||||||
padding:1px;
|
|
||||||
width:240px;
|
width:240px;
|
||||||
height:1px;
|
height:1px;
|
||||||
background-color:#c6e9fe;
|
background-color:#c6e9fe;
|
||||||
|
@ -1134,7 +1131,6 @@ ul.user_course_sort li{list-style-type:none;
|
||||||
}
|
}
|
||||||
.user_underline3{
|
.user_underline3{
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
padding:1px;
|
|
||||||
width:120px;
|
width:120px;
|
||||||
height:1px;
|
height:1px;
|
||||||
background-color:#c6e9fe;
|
background-color:#c6e9fe;
|
||||||
|
@ -1143,7 +1139,6 @@ ul.user_course_sort li{list-style-type:none;
|
||||||
}
|
}
|
||||||
.homepage_underline{
|
.homepage_underline{
|
||||||
margin:1px;
|
margin:1px;
|
||||||
padding:1px;
|
|
||||||
width:240px;
|
width:240px;
|
||||||
height:1px;
|
height:1px;
|
||||||
background-color:#c6e9fe;
|
background-color:#c6e9fe;
|
||||||
|
@ -3063,7 +3058,6 @@ div.repos_explain{
|
||||||
/* new linchun compitition */
|
/* new linchun compitition */
|
||||||
.contest_underline{
|
.contest_underline{
|
||||||
margin:1px;
|
margin:1px;
|
||||||
padding:1px;
|
|
||||||
width:900px;
|
width:900px;
|
||||||
height:0.5px;
|
height:0.5px;
|
||||||
background-color:#aaa;
|
background-color:#aaa;
|
||||||
|
|
|
@ -279,6 +279,7 @@ a:hover.close_btn {background-position:-66px 0;}
|
||||||
.show_btn {background-position:-119px 0;}
|
.show_btn {background-position:-119px 0;}
|
||||||
.msgserver a {color:#15bccf; }
|
.msgserver a {color:#15bccf; }
|
||||||
.break_word{word-break: break-all;word-wrap: break-word;}
|
.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;}
|
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue