added NamespacedProject role. Extended project info displayed for admin. Fixed project limit

This commit is contained in:
Dmitriy Zaporozhets 2012-12-14 08:14:05 +03:00
parent 44209861e8
commit b01f8b63c2
18 changed files with 201 additions and 131 deletions

View file

@ -1,12 +1,13 @@
%tr
%td
= image_tag gravatar_icon(snippet.author_email), class: "avatar s24"
%a{href: project_snippet_path(snippet.project, snippet)}
%strong= truncate(snippet.title, length: 60)
%td
= snippet.file_name
%td
%span.cgray
- if snippet.expires_at
- if snippet.expires_at
= snippet.expires_at.to_date.to_s(:short)
- else
Never

View file

@ -1,21 +1,21 @@
= render "projects/project_head"
- if can? current_user, :write_snippet, @project
.alert-message.block-message
%h3.page_title
Snippets
%small share code pastes with others out of git repository
- if can? current_user, :write_snippet, @project
= link_to new_project_snippet_path(@project), class: "btn small add_new right", title: "New Snippet" do
Add new snippet
Share code pastes with others if it can't be in a git repository
%br
To add new snippet - click on button.
%br
%table
%thead
%tr
%th Title
%th File Name
%th Expires At
= render @snippets.fresh
- if @snippets.fresh.empty?
= render @snippets
- if @snippets.empty?
%tr
%td{colspan: 3}
%h3.nothing_here_message Nothing here.