From f6561395a47318df94355365adedabfc681496d7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Oct 2014 09:17:23 +0800 Subject: [PATCH 01/14] #1281 --- config/locales/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 1e3bd0098..aeaa344e9 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2120,7 +2120,7 @@ zh: label_bug: 漏洞 label_school_no_course: 该学校未开设任何课程,您可以查看其他学校课程 - label_school_less_course: 该学校开设课程较少,您可以查看其他学校课程 + label_school_less_course: 您也可以查看其他学校课程 label_file_not_found: 对不起,该文件现在不能下载 label_goto_homepage: 返回主页 From b6551f895520d3a65d81c25240621d74d0ae6554 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Oct 2014 10:27:19 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=20#1297=E4=BF=AE=E5=A4=8D=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E8=83=BD=E7=9C=8B=E5=88=B0=E5=8F=91=E5=B8=83=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=8C=89=E9=92=AE=E7=9A=84BUG=20=202.=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AF=BE=E7=A8=8B=E6=98=AF=E5=90=A6=E5=AF=B9=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E5=BC=80=E5=8F=91=E7=9A=84=E6=95=B0=E6=8D=AE=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=20=203.=E9=A1=B5=E9=9D=A2=E4=BB=A3=E7=A0=81=E6=95=B4?= =?UTF-8?q?=E7=90=86=20=20=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=93=E5=89=8D=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=98=AF=E5=90=A6=E5=9C=A8=E8=AF=BE=E7=A8=8B=E6=9C=89?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=80=9A=E7=9F=A5=E6=9D=83=E9=99=90=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_users.html.erb | 197 ++++++++++-------- app/views/news/_course_news.html.erb | 8 +- ...140930072719_add_open_student_to_course.rb | 5 + 3 files changed, 118 insertions(+), 92 deletions(-) create mode 100644 db/migrate/20140930072719_add_open_student_to_course.rb diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 380481fe2..1410e2277 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -24,17 +24,17 @@ @@ -48,24 +48,30 @@
- - - - - - - - - - -
<%= l(:label_user_home) %><%= l(:label_user_location) %> : - -
<%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %> <%=link_to "主页", home_path %> > <%=link_to "软件创客", :controller => 'users', :action => 'index' %> > <%=link_to @user.name, user_path %>
+ + + + + + + + + + +
<%= l(:label_user_home) %><%= l(:label_user_location) %> : + +
+ <%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %> + + <%=link_to "主页", home_path %> > + <%=link_to "软件创客", :controller => 'users', :action => 'index' %> > + <%=link_to @user.name, user_path %> +
@@ -92,11 +98,12 @@ <% end %> - -
- <%= render :partial => 'users/user_score', :locals => {:user => @user}%> -
- + + +
+ <%= render :partial => 'users/user_score', :locals => {:user => @user}%> +
+ @@ -104,40 +111,45 @@
- <%= link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%>   + + <%= link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%> +   - <%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users.count.to_s+")", :controller=>"users", :action=>"user_fanslist" %>  - -   - + + <%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users.count.to_s+")", :controller=>"users", :action=>"user_fanslist" %> +    <% if @user.id == User.current.id %>

<%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_user_introduction'} %>

<% end %> <% unless @user.user_extensions.nil? %> -

- <%= @user.user_extensions.brief_introduction %> -

+

+ <%= @user.user_extensions.brief_introduction %> +

<% end %> @@ -148,55 +160,64 @@
- + + - + + - - - - - <% unless @user.user_extensions.nil? %> - <% unless @user.user_extensions.identity == 2 %> - - - - <% end %> + <% unless @user.user_extensions.identity == 2 %> + + + + <% end %> <% if @user.user_extensions.identity == 0 %> - + + <% end %> <% if( (@user.user_extensions.identity == 1) && (is_watching?(@user) ) )%> - - - + + + + <% end %> <% else%> - - - - - - + + + + + + <% end %>
<%= l(:label_user_joinin) %>:<%= format_time(@user.created_on) %> + <%= l(:label_user_joinin) %>: + + <%= format_time(@user.created_on) %> +
<%= l(:label_user_login) %>:<%= format_time(@user.last_login_on) %> + <%= l(:label_user_login) %>: + + <%= format_time(@user.last_login_on) %> +
<%= l(:field_occupation) %>: - <% unless @user.user_extensions.school.nil? %> - <%= @user.user_extensions.school.name %> - <% end %> -
<%= l(:field_occupation) %>: + <% unless @user.user_extensions.school.nil? %> + <%= @user.user_extensions.school.name %> + <% end %> +
<%= l(:label_location) %>:<%= @user.user_extensions.location %><%= @user.user_extensions.location_city %>
- <%= l(:label_technical_title) %>:<%= @user.user_extensions.technical_title %> + <%= l(:label_technical_title) %>: + + <%= @user.user_extensions.technical_title %> +
<%= l(:label_bidding_user_studentcode)%>:<%= @user.user_extensions.student_id %>
+ <%= l(:label_bidding_user_studentcode)%>: + + <%= @user.user_extensions.student_id %> +
<%= l(:field_occupation) %>:
<%= l(:label_location) %>:
<%= l(:field_occupation) %>:
<%= l(:label_location) %>:
-
@@ -251,9 +272,9 @@
<% if @user.user_extensions.identity == 2 %> - <%= render_menu :user_enterprise_menu %> + <%= render_menu :user_enterprise_menu %> <% else %> - <%= render_menu :user_menu %> + <%= render_menu :user_menu %> <% end %>
diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb index c49e46799..f8bd9c638 100644 --- a/app/views/news/_course_news.html.erb +++ b/app/views/news/_course_news.html.erb @@ -64,12 +64,12 @@ <%= label_tips %> -<%= link_to(btn_tips, - new_course_news_path(@course), - :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %> <% if @course && User.current.allowed_to?(:manage_news, @course) %> + <%= link_to(btn_tips, new_course_news_path(@course), + :class => 'icon icon-add', + :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %> +