Commit 20ce3980d3f06784a0bf617ef6d3b898ed2f1e54

Authored by Dmitriy Zaporozhets
1 parent 4a344c16

public_icon, private_icon helpers

app/assets/stylesheets/common.scss
... ... @@ -422,3 +422,9 @@ img.emoji {
422 422 .search-container {
423 423 margin-top: 30px;
424 424 }
  425 +
  426 +.description-block {
  427 + @extend .light-well;
  428 + @extend .light;
  429 + margin-bottom: 10px;
  430 +}
... ...
app/helpers/application_helper.rb
... ... @@ -202,4 +202,13 @@ module ApplicationHelper
202 202 def extra_config
203 203 Gitlab.config.extra
204 204 end
  205 +
  206 + def public_icon
  207 + content_tag :i, nil, class: 'icon-globe cblue'
  208 + end
  209 +
  210 + def private_icon
  211 + content_tag :i, nil, class: 'icon-lock cgreen'
  212 + end
  213 +
205 214 end
... ...
app/views/admin/projects/index.html.haml
... ... @@ -47,9 +47,9 @@
47 47 - @projects.each do |project|
48 48 %li
49 49 - if project.public
50   - %i.icon-share
  50 + = public_icon
51 51 - else
52   - %i.icon-lock.cgreen
  52 + = private_icon
53 53 = link_to project.name_with_namespace, [:admin, project]
54 54 .pull-right
55 55 = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
... ...
app/views/groups/edit.html.haml
... ... @@ -19,9 +19,9 @@
19 19 - @group.projects.each do |project|
20 20 %li
21 21 - if project.public
22   - %i.icon-share
  22 + = public_icon
23 23 - else
24   - %i.icon-lock.cgreen
  24 + = private_icon
25 25 = link_to project.name_with_namespace, project
26 26 .pull-right
27 27 = link_to 'Team', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
... ...
app/views/groups/show.html.haml
... ... @@ -13,7 +13,7 @@
13 13 .loading.hide
14 14 .side.span4
15 15 - if @group.description.present?
16   - .description.well.well-small.light
  16 + .description-block
17 17 = @group.description
18 18 = render "projects", projects: @projects
19 19 .prepend-top-20
... ...
app/views/help/permissions.html.haml
... ... @@ -62,5 +62,6 @@
62 62 %fieldset
63 63 %legend Owner
64 64 %ul
  65 + %li Switch public mode
65 66 %li Transfer project to another namespace
66 67 %li Remove project
... ...
app/views/snippets/_snippet.html.haml
1 1 %li
2 2 .snippet-title
3 3 - if snippet.private?
4   - %i.icon-lock.cgreen
  4 + = private_icon
5 5 - else
6   - %i.icon-globe.cblue
  6 + = public_icon
7 7 = link_to reliable_snippet_path(snippet) do
8 8 %h5.inline
9 9 = truncate(snippet.title, length: 60)
... ...
app/views/teams/show.html.haml
... ... @@ -12,7 +12,7 @@
12 12 .loading.hide
13 13 .side.span4
14 14 - if @team.description.present?
15   - .description.well.well-small.light
  15 + .description-block
16 16 = @team.description
17 17 = render "projects", projects: @projects
18 18 .prepend-top-20
... ...