Fix group assoc. Show namespace in project list
This commit is contained in:
parent
65c470e843
commit
2f22874ba6
2 changed files with 6 additions and 2 deletions
|
@ -34,7 +34,7 @@ class Project < ActiveRecord::Base
|
||||||
attr_accessor :error_code
|
attr_accessor :error_code
|
||||||
|
|
||||||
# Relations
|
# Relations
|
||||||
belongs_to :group, foreign_key: "namespace_id", conditions: 'type = Group'
|
belongs_to :group, foreign_key: "namespace_id", conditions: "type = 'Group'"
|
||||||
belongs_to :namespace
|
belongs_to :namespace
|
||||||
belongs_to :owner, class_name: "User"
|
belongs_to :owner, class_name: "User"
|
||||||
has_many :users, through: :users_projects
|
has_many :users, through: :users_projects
|
||||||
|
|
|
@ -12,7 +12,11 @@
|
||||||
- projects.each do |project|
|
- projects.each do |project|
|
||||||
%li.wll
|
%li.wll
|
||||||
= link_to project_path(project), class: dom_class(project) do
|
= link_to project_path(project), class: dom_class(project) do
|
||||||
%strong.project_name= truncate(project.name, length: 25)
|
- if project.namespace
|
||||||
|
= project.namespace.human_name
|
||||||
|
\/
|
||||||
|
%strong.project_name
|
||||||
|
= truncate(project.name, length: 25)
|
||||||
%span.arrow
|
%span.arrow
|
||||||
→
|
→
|
||||||
%span.last_activity
|
%span.last_activity
|
||||||
|
|
Loading…
Reference in a new issue