From 8335c111c70a3d1bbe4ccb0af70b62d4280b153c Mon Sep 17 00:00:00 2001 From: baiyu Date: Tue, 15 Oct 2013 09:39:42 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E4=BA=86=E2=80=9C?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=AF=BE=E7=A8=8B=E2=80=9D=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=202=E3=80=81=E4=BF=AE=E6=94=B9=E4=BA=86=E6=88=91=E7=9A=84?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E9=87=8C=E7=9A=84=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 12 ++++++++++++ app/views/my/account.html.erb | 2 +- app/views/projects/_project.html.erb | 10 +++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c16ff2f5..b42f1303 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -248,6 +248,18 @@ module ApplicationHelper classes = (ancestors.empty? ? 'root' : 'child') s << "
  • " s << h(block_given? ? yield(project) : project.name) + unless User.current.member_of?(@project) + s << "" + s << watcher_link(@project, User.current) + s << "" + end + if @project.project_type == 1 + unless Course.find_by_extra(@project.identifier).tea_id == User.current.id + s << "" + s << join_in_course(@project, User.current) + s << "" + end + end s << (render :partial => 'projects/project', :locals => {:project => project}).to_s s << "
    \n" ancestors << project diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 0cceb69a..ca392ead 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -59,7 +59,7 @@ <% unless @user.user_extensions.nil?%> -

    <%= l(:field_occupation)%><%= text_field_tag "occupation", @user.user_extensions.occupation, :class => 'occupation'%> +

    <%= l(:field_occupation)%> <%= text_field_tag "occupation", @user.user_extensions.occupation, :class => 'occupation'%>

    <%else%>

    <%= l(:field_occupation)%><%= text_field_tag "occupation", nil, :class => 'occupation'%> diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index ae0a397f..69e9776f 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -63,7 +63,7 @@

    - + <% if(@project.project_type==1)%> <%= content_tag('span', "#{l(:field_tea_name)}: ") %> <% else %> @@ -86,16 +86,16 @@ <%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
    - <% unless User.current.member_of?(@project) %> - +