Conflicts:
	config/locales/en.yml
	config/locales/zh.yml
This commit is contained in:
z9hang 2015-03-09 15:26:02 +08:00
commit d634532789
16 changed files with 88 additions and 106 deletions

View File

@ -41,7 +41,7 @@ module Mobile
mount Apis::Comments
#add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'})
#add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development?
add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development?
end
end

View File

@ -447,7 +447,7 @@ class UsersController < ApplicationController
activity = activity.reject { |e|
!User.current.admin? &&
(((e.act_type == "Issue") && !e.act.project.visible?(User.current)) ||
(e.act_type == "Bid" && e.act.courses.first.is_public == 0 && !User.current.member_of_course?(e.act.courses.first)) ||
(e.act_type == "Bid" && !e.act.courses.first.nil? && e.act.courses.first.is_public == 0 && !User.current.member_of_course?(e.act.courses.first)) ||
(e.act_type == "Journal" && e.act.respond_to?("Project") && !e.act.project.visible?(User.current)) ||
(e.act_type == "News" && ((!e.act.project.nil? && !e.act.project.visible?(User.current)) || (!e.act.course.nil? && e.act.course.is_public == 0 && !User.current.member_of_course?(e.act.course)))) ||
(e.act_type == "Message" && !e.act.board.nil? && ((!e.act.board.project.nil? && !e.act.board.project.visible?(User.current)) || (!e.act.board.course.nil? && e.act.board.course.is_public == 0 && !User.current.member_of_course?(e.act.board.course)))))

View File

@ -9,5 +9,5 @@
<%= link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
-%>
<%= link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
<%= link_to page, url, page.current? ? {:remote => remote,:class => 'current-page', :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} : {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>

View File

@ -135,10 +135,10 @@
</ul>
<% end %>
<div class="subNav">
<%= link_to "动态", {:controller => 'projects', :action => 'show', :id => @project.id}, :style => "color:#3CA5C6" %>
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :style => "color:#3CA5C6" %>
</div>
<div class="subNav">
<%= link_to "问题跟踪", project_issues_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.issues.count %>)</span>
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.issues.count %>)</span>
<span>
<% if User.current.logged? && User.current.member_of?(@project) %>
<%= link_to "+发布问题", new_project_issue_path(@project) , :style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %></span>
@ -148,24 +148,24 @@
<%= link_to "讨论区", project_boards_path(@project), :style => "color:#3CA5C6" %>
<span class="subnav_num">(<%= @project.boards.first.topics.count %>)</span>
<% if User.current.logged? && User.current.member_of?(@project) %>
<%= link_to "+发贴", new_board_message_path(@project.boards.first), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
<%= link_to "+发贴", new_board_message_path(@project.boards.first, true), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
<% end %>
</div>
<div class="subNav">
<%= link_to "资源库", project_files_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.attachments.count %>)</span>
<%= link_to l(:label_course_file), project_files_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.attachments.count %>)</span>
<% if User.current.logged? && User.current.member_of?(@project) %>
<%= link_to "+上传资源", new_project_file_path(@project),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
<% end %>
</div>
<div class="subNav">
<%= link_to "版本库", {:controller => 'repositories', :action => 'show', :id => @project.id}, :style => "color:#3CA5C6" %>
<%= link_to l(:field_user_active_changeset), {:controller => 'repositories', :action => 'show', :id => @project.id}, :style => "color:#3CA5C6" %>
<span class="subnav_num">(<%= @project.repositories.count %>)</span>
<% if User.current.logged? && User.current.member_of?(@project) %>
<%= link_to "+创建版本库", new_project_repository_path(@project),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
<% end %>
</div>
<div class="subNav subNav_jiantou">更多</div>
<div class="subNav subNav_jiantou"><%= l(:label_more) %></div>
<ul class="navContent" style="padding-left: 0px">
<%= render 'projects/tools_expand' %>
</ul>

View File

@ -4,9 +4,7 @@
<h1 class="ur_page_title">
<%= @poll.polls_name.empty? ? l(:label_poll_new) : @poll.polls_name %>
</h1>
<p class="ur_prefix_content">
<%= @poll.polls_description%>
</p>
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
</div>
<div class="ur_card">
<ol class="ur_questions">

View File

@ -33,9 +33,7 @@
<h1 class="ur_page_title">
<%= @poll.polls_name%>
</h1>
<p class="ur_prefix_content">
<%= @poll.polls_description.html_safe %>
</p>
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
</div>

View File

@ -1,24 +0,0 @@
<div class="floatbox" style="margin:100px;">
<div ><a href="#" class="box_close"></a></div>
<div class="cl"></div>
<div class="box_main">
<h3 class="box_h3">发送邮件邀请新用户</h3>
<p class="box_p">输入好友邮箱地址Trustie帮您免费发送</p>
<div id="is_registed">
<%= render :partial => 'regested', locals: { :isregisted => false} %>
</div>
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get',:remote=>true) do %>
<ul>
<li >
<%= text_field_tag 'mail', '邮箱', :class => "fb_item fl" %>
</li>
<div class="cl"></div>
<div class="cl"></div>
</ul>
<%= submit_tag '免费发送', :class=> "btn_free" %>
<% end %>
</div>
</div>

View File

@ -44,11 +44,7 @@
<% end %>
<% end %>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">

View File

@ -1 +1,24 @@
<%= render :partial => "invite_members_by_mail"%>
<div class="project_r_h">
<h2 class="project_h2">邀请加入</h2>
</div>
<div class="floatbox" style="margin:130px;">
<div >
<a href="#" class="box_close"></a>
</div>
<div class="cl"></div>
<div class="box_main">
<h3 class="box_h3">发送邮件邀请新用户</h3>
<p class="box_p">
输入好友邮箱地址Trustie帮您免费发送
</p>
<div id="is_registed">
<%= render :partial => 'regested', locals: { :isregisted => false} %>
</div>
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get',:remote=>true) do %>
<%= text_field_tag 'mail', '邮箱', :class => "fb_item fl" %>
<div class="cl"></div>
<div class="cl"></div>
<%= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
<% end %>
</div>
</div>

View File

@ -1,10 +0,0 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'invite_members_by_mail') %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').css('height','569px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
"<a href='#' onclick='hidden_homework_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -180,4 +180,4 @@
</div>
</div>
<%= paginate @events_pages %>
<%= paginate @events_pages, :window => 3%>

View File

@ -9,18 +9,35 @@
<tr>
<td class="r1" style="word-break: break-all;word-wrap: break-word;">
<div class="cb">
<strong><%= l(:label_attachment) %>:&nbsp;&nbsp;<%= file.filename %></strong>
<strong>
<%= l(:label_attachment) %>:
&nbsp;&nbsp;
<%= file.filename %>
</strong>
<span style="margin-left: 4px;">
<%= link_to_attachment file, {:download => true, :text => image_tag("/images/button/dl.png", width: "70px", alt: l(:button_download), :class => 'download_icon')}%>
<%= link_to_attachment file, {:download => true, :text => image_tag("/images/button/dl.png", width: "70px", alt: l(:button_download), :class => 'download_icon')}%>
</span>
</div>
<strong><%= l(:field_description) %></strong>:&nbsp;&nbsp;<%= file.description %>
<div class="c9 gray-color"> <%= l('attachment.category')%><%=result_come_from file%> </div>
<strong>
<%= l(:field_description) %>
</strong>:
&nbsp;&nbsp;
<%= file.description %>
<div class="c9 gray-color">
<%= l('label_attachment_category')%>
<%=result_come_from file%>
</div>
<span class="gray blue-color">
<%= l('attachment.download_num')%><%= file.downloads%>|
<%= l('attachment.size')%><%= number_to_human_size(file.filesize) %>|
<%= l('attachment.sharer')%><a class="gray" ><%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %></a>|
<%= l('attachment.upload_time')%><%= format_time(file.created_on) %>
<%= l('label_attachment_download_num')%>
<%= file.downloads%>|
<%= l('label_attachment_size')%>
<%= number_to_human_size(file.filesize) %>|
<%= l('label_attachment_sharer')%>
<a class="gray" >
<%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %>
</a>|
<%= l('label_attachment_upload_time')%>
<%= format_time(file.created_on) %>
</span>
<div style="display: none"></div>
</td>

View File

@ -16,8 +16,8 @@
<div class="menu">
<%= link_to "#{l(:label_course_new)}", new_course_path, class: 'icon icon-add' if @user == User.current %>
<ul>
<li mode='doing' class="on"><%= l('user.courses.doing')%></li>
<li mode='end'><%= l('user.courses.done')%></li>
<li mode='doing' class="on"><%= l(:label_course_doing)%></li>
<li mode='end'><%= l(:label_course_done)%></li>
</ul>
</div>

View File

@ -110,45 +110,7 @@
</div>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<ul class="user-welcome-message-list">
<h3 style="color: rgb(21, 188, 207)">
<strong>
<%= l(:lable_user_active)%>
</strong>
</h3>
<div class="user-message-box-list" style="margin-top: 10px;">
<%activities = find_all_activities%>
<% activities.each do |event| %>
<li style="display: block;height:60px; padding-bottom: 4px;">
<div class="inner-right" style="float: left; height: 100%; ">
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
</div>
<div class="inner-right" style="float: right; width:86%; height: 100%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" >
<span style="color: green;">
<%= link_to event.event_author, (user_path(event.event_author) if event.event_author),
:style => "color:green;", :target => "_blank" %>
</span>
<%= show_user_content event %>
<p style="margin-top: 4px;">
<span style="color: rgb(172, 174, 177)">
<%= l(:field_updated_on) %>
<%= format_time event.event_datetime %>
<%#= l(:field_time_ago) %>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="float: right; color: rgb(172, 174, 177);">
<%= show_event_reply event %>
</span>
</p>
</div>
</li>
<% end %>
</div>
</ul>
</div>
<div class="right" style="float: right; width: 48%; ">
<div class="right" style="float: right; width: 48%; padding-top: 8px;">
<ul class="welcome-message-list">
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
<h3 style="color: rgb(21, 188, 207);"><strong> <%= l(:lable_bar_active)%> </strong> <%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
@ -156,7 +118,7 @@
<span style="margin-top: -30px;float: right; display: block;"> <%= link_to l(:label_more), forums_path %> </span>
</div>
<div class="welcome-box-list-new memo_activity">
<% topics = find_new_forum_topics(6) %>
<% topics = find_new_forum_topics(12) %>
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
<li class="message-brief-intro" style="line-height:1.4em;">
<div class='memo_title text_nowrap'>

View File

@ -1877,6 +1877,8 @@ en:
label_course_empty_select: You have not selected course
label_enterprise_page_made: enterprise_page
label_add_tag: Add Tag
#api
label_recently_updated_notification: Recently updated notification
label_recently_updated_homework: Recently updated the homework

View File

@ -2274,6 +2274,17 @@ zh:
# 托管平台主页 > 搜索提示信息
label_search_information: 请输入要搜索的关键字
welcome:
search:
information: "请输入要搜索的关键字" # 搜索提示信息
select: # 下拉列表
project: "项目"
course: "课程"
user: "用户"
userinfo:
nickname: "昵称"
showname: "姓名"
email: "邮箱"
# 托管平台主页 > 下拉列表
label_select_project: 项目
label_select_course: 课程
@ -2570,6 +2581,15 @@ zh:
label_enterprise_nil: 该模块为最新上线模块,目前还没有创建企业项目!
label_enterprises: 组织
label_add_tag: 添加标签
label_tags_opensource: 开源项目
label_attachment_category: 所属分类
label_attachment_download_num: 下载
label_attachment_size: 大小
label_attachment_sharer: 共享者
label_attachment_upload_time: 上传时间
#api
label_recently_updated_notification: 最近更新了通知
label_recently_updated_homework: 最近更新了作业