Show only tm events related to this project

This commit is contained in:
Dmitriy Zaporozhets 2012-08-21 08:20:11 +03:00
parent 366c0065c4
commit 2e7ca8c866
3 changed files with 13 additions and 11 deletions

View file

@ -1,17 +1,18 @@
.projects { .projects {
@extend .row; @extend .row;
.activities { .activities {
} }
.side { .side {
@extend .span4; @extend .span4;
@extend .right; @extend .right;
.projects_box { .projects_box {
h5 { h5 {
color:$style_color; color:$style_color;
font-size:16px; font-size:16px;
text-shadow: 0 1px 1px #fff; text-shadow: 0 1px 1px #fff;
padding: 2px 10px;
} }
@extend .leftbar; @extend .leftbar;
@extend .ui-box; @extend .ui-box;
@ -19,19 +20,19 @@
} }
} }
.new_project, .new_project,
.edit_project { .edit_project {
.project_name_holder { .project_name_holder {
input, input,
label { label {
font-size:16px; font-size:16px;
line-height:20px; line-height:20px;
padding:8px; padding:8px;
} }
label { label {
color:#888; color:#888;
} }
.btn { .btn {
padding:6px; padding:6px;
margin-left:10px; margin-left:10px;
} }

View file

@ -9,6 +9,7 @@ class TeamMembersController < ApplicationController
def show def show
@team_member = project.users_projects.find(params[:id]) @team_member = project.users_projects.find(params[:id])
@events = @team_member.user.recent_events.where(:project_id => @project.id).limit(7)
end end
def new def new

View file

@ -51,7 +51,7 @@
= form_for(@team_member, as: :team_member, url: project_team_member_path(@project, @team_member)) do |f| = form_for(@team_member, as: :team_member, url: project_team_member_path(@project, @team_member)) do |f|
= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select", disabled: !allow_admin = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select", disabled: !allow_admin
%hr %hr
= render user.recent_events.limit(5) = render @events
:javascript :javascript
$(function(){ $(function(){
$('.repo-access-select, .project-access-select').live("change", function() { $('.repo-access-select, .project-access-select').live("change", function() {