Changed My Projects block
This commit is contained in:
parent
f5ba1b34f2
commit
3e2e01deb6
|
@ -6,7 +6,8 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def index
|
||||
@projects = Project.visible_to(current_user).paginate(:page => params[:project_page])
|
||||
@own_projects = current_user.projects
|
||||
@own_projects = current_user.own_projects
|
||||
@part_projects = current_user.projects - @own_projects
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
%ul
|
||||
- @own_projects.each do |project|
|
||||
%li
|
||||
= project.name
|
||||
- if (project.owner == current_user)
|
||||
= '(' + t("layout.owner") + ')'
|
||||
= link_to project_path(project), project.uname
|
||||
.block.notice
|
||||
%h3= t("layout.users.part_projects")
|
||||
.content
|
||||
%p
|
||||
%ul
|
||||
- @part_projects.each do |project|
|
||||
%li
|
||||
= link_to(project.owner.uname, user_path(project.owner)) + "/" + link_to(project.unixname + ' (' + project.name + ')', project_path(project))
|
||||
|
|
|
@ -246,6 +246,7 @@ ru:
|
|||
back_to_the_list: ⇐ К списку пользователей
|
||||
confirm_delete: Вы уверены, что хотите удалить этого пользователя?
|
||||
own_projects: Мои проекты
|
||||
part_projects: Участвую в проектах
|
||||
|
||||
git:
|
||||
repositories:
|
||||
|
|
Loading…
Reference in New Issue