Spianch test for group dashboard

This commit is contained in:
Dmitriy Zaporozhets 2012-10-03 13:42:17 +03:00
parent 224fb5770c
commit 8b76e30656
6 changed files with 68 additions and 13 deletions

View file

@ -22,6 +22,10 @@ class Group < ActiveRecord::Base
delegate :name, to: :owner, allow_nil: true, prefix: true
def self.search query
where("name like :query or code like :query", query: "%#{query}%")
end
def to_param
code
end

View file

@ -1,8 +1,10 @@
.projects
.activities.span8
.back_link
= link_to dashboard_path do
&larr; To dashboard
= link_to dashboard_path, class: 'btn very_small' do
&larr; To dashboard
&nbsp;
%span.cgray Events and projects are filtered in scope of group
%hr
= render 'shared/no_ssh'
- if @events.any?
.content_list= render @events

View file

@ -7,14 +7,17 @@
= link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn small right"
%br
.file_holder
.file_title
%i.icon-file
%strong= @snippet.file_name
%span.options
= link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn very_small", target: "_blank"
.file_content.code
%div{class: current_user.dark_scheme ? "black" : ""}
= raw @snippet.colorize(options: { linenos: 'True'})
%div
.file_holder
.file_title
%i.icon-file
%strong= @snippet.file_name
%span.options
= link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn very_small", target: "_blank"
.file_content.code
%div{class: current_user.dark_scheme ? "black" : ""}
= raw @snippet.colorize(options: { linenos: 'True'})
= render "notes/notes_with_form", tid: @snippet.id, tt: "snippet"
%div
= render "notes/notes_with_form", tid: @snippet.id, tt: "snippet"