OSDN Git Service

public_icon, private_icon helpers
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Thu, 6 Jun 2013 11:02:29 +0000 (14:02 +0300)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Thu, 6 Jun 2013 11:02:29 +0000 (14:02 +0300)
app/assets/stylesheets/common.scss
app/helpers/application_helper.rb
app/views/admin/projects/index.html.haml
app/views/groups/edit.html.haml
app/views/groups/show.html.haml
app/views/help/permissions.html.haml
app/views/snippets/_snippet.html.haml
app/views/teams/show.html.haml

index 4cbd9d8..50dd6e4 100644 (file)
@@ -422,3 +422,9 @@ img.emoji {
 .search-container {
   margin-top: 30px;
 }
+
+.description-block {
+  @extend .light-well;
+  @extend .light;
+  margin-bottom: 10px;
+}
index 488a55b..7af74a9 100644 (file)
@@ -202,4 +202,13 @@ module ApplicationHelper
   def extra_config
     Gitlab.config.extra
   end
+
+  def public_icon
+    content_tag :i, nil, class: 'icon-globe cblue'
+  end
+
+  def private_icon
+    content_tag :i, nil, class: 'icon-lock cgreen'
+  end
+
 end
index 59831d8..af65a86 100644 (file)
@@ -47,9 +47,9 @@
         - @projects.each do |project|
           %li
             - if project.public
-              %i.icon-share
+              = public_icon
             - else
-              %i.icon-lock.cgreen
+              = private_icon
             = link_to project.name_with_namespace, [:admin, project]
             .pull-right
               = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
index 0f8c140..aaedcc5 100644 (file)
@@ -19,9 +19,9 @@
             - @group.projects.each do |project|
               %li
                 - if project.public
-                  %i.icon-share
+                  = public_icon
                 - else
-                  %i.icon-lock.cgreen
+                  = private_icon
                 = link_to project.name_with_namespace, project
                 .pull-right
                   = link_to 'Team', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
index 1ce008f..8afc4ab 100644 (file)
@@ -13,7 +13,7 @@
     .loading.hide
   .side.span4
     - if @group.description.present?
-      .description.well.well-small.light
+      .description-block
         = @group.description
     = render "projects", projects: @projects
     .prepend-top-20
index 2075753..a04d9d3 100644 (file)
@@ -62,5 +62,6 @@
   %fieldset
     %legend Owner
     %ul
+      %li Switch public mode
       %li Transfer project to another namespace
       %li Remove project
index 1256236..194eb05 100644 (file)
@@ -1,9 +1,9 @@
 %li
   .snippet-title
     - if snippet.private?
-      %i.icon-lock.cgreen
+      = private_icon
     - else
-      %i.icon-globe.cblue
+      = public_icon
     = link_to reliable_snippet_path(snippet) do
       %h5.inline
         = truncate(snippet.title, length: 60)
index 2ad7f74..8582f85 100644 (file)
@@ -12,7 +12,7 @@
     .loading.hide
   .side.span4
     - if @team.description.present?
-      .description.well.well-small.light
+      .description-block
         = @team.description
     = render "projects", projects: @projects
     .prepend-top-20