Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
47e6d5c909
|
@ -34,6 +34,8 @@ module Mobile
|
|||
user_expose :img_url
|
||||
#昵称
|
||||
expose :nickname
|
||||
#真名
|
||||
expose :realname
|
||||
#性别
|
||||
user_expose :gender
|
||||
#我的二维码
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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
|
||||
|
||||
#忘记密码
|
||||
|
|
|
@ -33,6 +33,15 @@
|
|||
<% end %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%>
|
||||
<%= get_course_term @course %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %>
|
||||
<%= content_tag "div", course.short_description, :class => "brief_introduction", :title => course.short_description %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="information_for_course" >
|
||||
|
@ -71,10 +80,8 @@
|
|||
</div>
|
||||
|
||||
<div class="add-info">
|
||||
<div class="main-language" style="margin-left: 30px;margin-top:-10px">
|
||||
<%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%>
|
||||
<%= get_course_term @course %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="add-info" style="margin-left: 30px; margin-top: -20px">
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<br />
|
||||
<p class="mt5">
|
||||
<br />
|
||||
<%= l :label_create_time %>: : <%= format_time(@course.created_at) %>
|
||||
<%= l :label_create_time %> : <%= format_time(@course.created_at) %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -25,27 +25,27 @@
|
|||
<% if file.is_public? || User.current.member_of_course?(course) %>
|
||||
<div class="re_con_box">
|
||||
<div class="">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s,:class => "c_dblue f_14 f_b f_l hiddent" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
||||
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current,file) %>
|
||||
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
||||
|
||||
<% if delete_allowed && file.container_id == @course.id && file.container_type == "Course" %>
|
||||
<span id="is_public_<%= file.id %>">
|
||||
<%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %>
|
||||
<%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open c_blue",:method => :post %>
|
||||
</span>
|
||||
<% else %>
|
||||
<!-- <#%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %> -->
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to("选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current,file) %>
|
||||
<%= link_to("选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="">
|
||||
<p class="f_l c_grey02 font">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
||||
<p class="f_l mb5 c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
||||
<%= link_to( l(:button_delete), attachment_path(file),
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
|
||||
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用<%= file.quotes.nil? ? 0:file.quotes %> </p>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<% unless tag_list.nil?%>
|
||||
<% tag_list.each do |k,v|%>
|
||||
<% 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>
|
||||
<a href="javascript:void(0);" class="files_tag_select"><%= k%>×<%= v%></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>
|
||||
<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%>×<%= v%></a>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<% end%>
|
|
@ -35,7 +35,7 @@
|
|||
<%= l(:label_courses_community)%>
|
||||
</a>
|
||||
</h2>
|
||||
<p>
|
||||
<p class="hiddent">
|
||||
<%= l(:label_user_location) %> :
|
||||
<%= link_to l(:field_homepage), home_path %>
|
||||
>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<div class="cl"></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 %>
|
||||
<% if @course.is_public == 0%>
|
||||
<span class="img_private ">
|
||||
|
|
|
@ -39,20 +39,11 @@
|
|||
|
||||
</div>
|
||||
<div class="course welcome_left" id="welcome_left">
|
||||
<% if User.current.login? %>
|
||||
<span class="font_welcome_school">
|
||||
<% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
|
||||
<span class="font_welcome_tdescription">,
|
||||
<!--
|
||||
edit by meng
|
||||
@course_page.description存储在first_page表中的description字段
|
||||
原本代码
|
||||
<%= @course_page.description %>
|
||||
!-->
|
||||
<%= l(:label_welcome_trustie_course_description) %>
|
||||
</span>
|
||||
<% else %>
|
||||
<% if @school_id == "0" %>
|
||||
|
||||
<% else %>
|
||||
<% if @school_id.nil? %>
|
||||
<%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course', :school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school', :method => 'get'} %>
|
||||
|
@ -64,6 +55,16 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="font_welcome_trustie">
|
||||
<!--
|
||||
edit by meng
|
||||
@course_page.title存储在first_page表中的title字段
|
||||
原本代码
|
||||
<%= @course_page.title %>
|
||||
!-->
|
||||
<%= l(:label_welcome_trustie_course) %>
|
||||
</span>
|
||||
<% else %>
|
||||
<% unless @course_page.nil? %>
|
||||
<span class="font_welcome_trustie">
|
||||
<!--
|
||||
|
@ -74,8 +75,18 @@
|
|||
!-->
|
||||
<%= l(:label_welcome_trustie_course) %>
|
||||
</span>
|
||||
|
||||
<span class="font_welcome_tdescription">,
|
||||
<!--
|
||||
edit by meng
|
||||
@course_page.description存储在first_page表中的description字段
|
||||
原本代码
|
||||
<%= @course_page.description %>
|
||||
!-->
|
||||
<%= l(:label_welcome_trustie_course_description) %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<div class="search-bar" id="search-bar">
|
||||
<%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course} %>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -117,9 +117,9 @@ a:hover.re_fabu{background:#55a1b9;}
|
|||
.re_con{ margin:5px; width:665px;}
|
||||
.re_con_top{color:#494949; }
|
||||
.re_con_top span{ color:#999999; font-weight:bold;}
|
||||
a.re_select{ display:block; height:20px; border:1px solid #ff9900; color:#ff9900; margin-left:10px; padding:2px 5px 1px;}
|
||||
a.re_select{ display:block; border:1px solid #ff9900; color:#ff9900; margin-left:10px; padding:1px 5px;}
|
||||
a:hover.re_select{ background:#ff9900; color:#fff; text-decoration:none;}
|
||||
a.re_open{display:block; width:46px; height:19px; border:1px solid #64bdd9; color:#64bdd9; margin-left:10px;padding-top:3px;}
|
||||
a.re_open{display:block; width:46px; border:1px solid #64bdd9; color:#64bdd9; margin-left:10px;padding:1px 5px;}
|
||||
a:hover.re_open{ background:#64bdd9; color:#fff; text-decoration:none;}
|
||||
a.re_de{ color:#6883b6; margin-left:15px;}
|
||||
.re_con_box{ border-bottom:1px dashed #dadada; padding-bottom:10px; margin-bottom:10px;}
|
||||
|
@ -511,8 +511,8 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px
|
|||
.newwork_btn a{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; display:block; text-align:center; float:right;}
|
||||
.newwork_btn a:hover{ background:#329cbd;}
|
||||
.files_tag{ width:670px; height:22px; overflow:hidden; margin-bottom:10px;}
|
||||
a.files_tag_icon{ background:#64bdd9; color:#fff; border:1px solid #54aeca; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px; }
|
||||
a:hover.files_tag_icon{ background:#54aeca;}
|
||||
a.files_tag_icon{ background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px; }
|
||||
a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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;}
|
||||
|
||||
|
||||
|
|
|
@ -1057,7 +1057,7 @@ display: block;
|
|||
float: left;
|
||||
margin-left: 20px;
|
||||
margin-top: 10px;
|
||||
width: 470px;
|
||||
width: 540px;
|
||||
font-family: '微软雅黑'; /*modify by men*/
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 13px;
|
||||
|
@ -1085,7 +1085,7 @@ float: left;
|
|||
}*/
|
||||
.information_for_course {
|
||||
margin-top: 20px;
|
||||
margin-left: 507px;
|
||||
margin-left: 550px;
|
||||
float: left;
|
||||
height: auto;
|
||||
width: 300px;
|
||||
|
@ -2008,10 +2008,10 @@ div.tableline{
|
|||
text-align: justify;
|
||||
}
|
||||
.brief_introduction {
|
||||
margin-top: -18px;
|
||||
margin-top: -30px;
|
||||
margin-left: 60px;
|
||||
/*display: inline-block;*/
|
||||
width: 500px;
|
||||
width: 480px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
|
Loading…
Reference in New Issue