summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-11 19:56:18 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-11 19:56:18 +0200
commitcc043f32d8bfa7da5e94061806ae56fc11902d71 (patch)
treef76367baa8b77aea900f396a5007711185f5d568 /app/views
parenta769204ff489bc750c4931ecdb22ef055eac042a (diff)
downloadgitlab-ce-cc043f32d8bfa7da5e94061806ae56fc11902d71.tar.gz
Admin area improved
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/projects/_form.html.haml46
-rw-r--r--app/views/admin/projects/edit.html.haml8
-rw-r--r--app/views/admin/projects/index.html.haml14
-rw-r--r--app/views/admin/projects/show.html.haml60
-rw-r--r--app/views/admin/team_members/_form.html.haml34
-rw-r--r--app/views/admin/team_members/edit.html.haml23
-rw-r--r--app/views/admin/team_members/index.html.haml28
-rw-r--r--app/views/admin/team_members/new.html.haml6
-rw-r--r--app/views/admin/team_members/show.html.haml26
-rw-r--r--app/views/admin/users/_form.html.haml14
-rw-r--r--app/views/admin/users/edit.html.haml7
-rw-r--r--app/views/admin/users/index.html.haml12
-rw-r--r--app/views/admin/users/show.html.haml78
-rw-r--r--app/views/kaminari/_first_page.html.haml9
-rw-r--r--app/views/kaminari/_gap.html.haml8
-rw-r--r--app/views/kaminari/_last_page.html.haml9
-rw-r--r--app/views/kaminari/_next_page.html.haml9
-rw-r--r--app/views/kaminari/_page.html.haml10
-rw-r--r--app/views/kaminari/_paginator.html.haml17
-rw-r--r--app/views/kaminari/_prev_page.html.haml9
-rw-r--r--app/views/layouts/_app_side.html.haml3
-rw-r--r--app/views/layouts/_projects_side.html.haml28
-rw-r--r--app/views/layouts/admin.html.haml1
-rw-r--r--app/views/profile/show.html.haml3
24 files changed, 261 insertions, 201 deletions
diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml
index d10fbf95767..4f6bc692b67 100644
--- a/app/views/admin/projects/_form.html.haml
+++ b/app/views/admin/projects/_form.html.haml
@@ -1,7 +1,6 @@
= form_for [:admin, @admin_project] do |f|
-if @admin_project.errors.any?
- #error_explanation
- %h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:"
+ .alert-message.block-message.error
%ul
- @admin_project.errors.full_messages.each do |msg|
%li= msg
@@ -10,27 +9,58 @@
= f.label :name
.input= f.text_field :name
.clearfix
- = f.label :code
- .input= f.text_field :code
+ = f.label :path do
+ Path
+ .input
+ .input-prepend
+ %span.add-on= "git@#{GIT_HOST["host"]}:"
+ = f.text_field :path, :placeholder => "example_project", :disabled => !@admin_project.new_record?
.clearfix
- = f.label :path
- .input= f.text_field :path
+ = f.label :code do
+ Code
+ .input
+ .input-prepend
+ %span.add-on= "http://#{GIT_HOST["host"]}/"
+ = f.text_field :code, :placeholder => "example"
- unless @admin_project.new_record?
.clearfix
= f.label :owner_id
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
+ - unless @admin_project.heads.empty?
+ .clearfix
+ = f.label :default_branch, "Default Branch"
+ .input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;")
+
+ .well
+ %h5 Features
+
+ .clearfix
+ = f.label :issues_enabled, "Issues"
+ .input= f.check_box :issues_enabled
+
+ .clearfix
+ = f.label :merge_requests_enabled, "Merge Requests"
+ .input= f.check_box :merge_requests_enabled
+
+ .clearfix
+ = f.label :wall_enabled, "Wall"
+ .input= f.check_box :wall_enabled
+
.clearfix
= f.label :description
- .input= f.text_area :description
+ .input= f.text_area :description, :class => "xxlarge"
.clear
%br
.actions
- = f.submit 'Save', :class => "btn"
+ = f.submit 'Save', :class => "btn primary"
+ = link_to 'Cancel', [:admin, @admin_project], :class => "btn"
+ = link_to 'Destroy', [:admin, @admin_project], :confirm => 'Are you sure?', :method => :delete, :class => "btn danger right"
:javascript
$(function(){
taggifyForm();
$('#project_owner_id').chosen();
+ $('#project_default_branch').chosen();
})
diff --git a/app/views/admin/projects/edit.html.haml b/app/views/admin/projects/edit.html.haml
index a6062be4014..b8d6f6899cb 100644
--- a/app/views/admin/projects/edit.html.haml
+++ b/app/views/admin/projects/edit.html.haml
@@ -1,7 +1,3 @@
-%h2= @admin_project.name
+%h3= @admin_project.name
+%hr
= render 'form'
-
-%br
-= link_to 'Back', admin_projects_path, :class => ""
-|
-= link_to 'Show', [:admin, @admin_project], :class => ""
diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml
index 576dbf046f7..7cda5220d68 100644
--- a/app/views/admin/projects/index.html.haml
+++ b/app/views/admin/projects/index.html.haml
@@ -1,7 +1,10 @@
-%table
+%h3
+ Projects
+ = link_to 'New Project', new_admin_project_path, :class => "btn small right"
+%hr
+%table.zebra-striped
%thead
%th Name
- %th Code
%th Path
%th Team Members
%th Last Commit
@@ -11,12 +14,9 @@
- @admin_projects.each do |project|
%tr
%td= link_to project.name, [:admin, project]
- %td= project.code
%td= project.path
%td= project.users_projects.count
%td= last_commit(project)
- %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}"
- %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete
-
+ %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small"
+ %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger"
= paginate @admin_projects
-= link_to 'New Project', new_admin_project_path, :class => "btn"
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index 3e589a0cecb..55610fa64e7 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -1,10 +1,10 @@
-- unless notice.nil?
- %p#notice= notice
+%h3
+ = @admin_project.name
+ = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "btn right small"
+%hr
-%h2= @admin_project.name
-
-%table.round-borders
+%table.zebra-striped
%tr
%td
%b
@@ -29,14 +29,33 @@
Description:
%td
= @admin_project.description
- %tr
- %td{:colspan => 2}
- = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "btn"
.span-14
- %h2 Team
+ %h3
+ Team
+ %small
+ ( #{@admin_project.users_projects.count} )
+
+ %hr
+
+ %table.zebra-striped
+ %thead
+ %tr
+ %th Name
+ %th Project Access
+ %th Repository Access
+ %th
+
+ - @admin_project.users_projects.each do |tm|
+ %tr
+ %td
+ = link_to tm.user_name, admin_users_path(tm.user)
+ %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "medium project-access-select", :disabled => :disabled
+ %td= select_tag :tm_repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "medium repo-access-select", :disabled => :disabled
+ %td= link_to 'Edit Access', edit_admin_team_member_path(tm), :class => "btn small"
+ %td= link_to 'Remove from team', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete, :class => "btn danger small"
= form_tag team_update_admin_project_path(@admin_project), :class => "bulk_import", :method => :put do
%table
@@ -51,27 +70,8 @@
%td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select"
%td= select_tag :repo_access, options_for_select(Repository.access_options), :class => "repo-access-select"
- %tr
- %td{ :colspan => 3 }
- = submit_tag 'Add', :class => "btn primary"
-
- %table.round-borders
- %thead
- %tr
- %th Name
- %th Added
- %th Project Access
- %th Repository Access
- %th
-
- - @admin_project.users_projects.each do |tm|
- %tr
- %td
- = link_to tm.user_name, admin_team_member_path(tm)
- %td= time_ago_in_words(tm.updated_at) + " ago"
- %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "project-access-select", :disabled => :disabled
- %td= select_tag :tm_repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "repo-access-select", :disabled => :disabled
- %td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
+ .actions
+ = submit_tag 'Add', :class => "btn primary"
:css
form select {
diff --git a/app/views/admin/team_members/_form.html.haml b/app/views/admin/team_members/_form.html.haml
index e6dd6a43f72..6929ade8c0e 100644
--- a/app/views/admin/team_members/_form.html.haml
+++ b/app/views/admin/team_members/_form.html.haml
@@ -1,33 +1,23 @@
-= form_for @admin_team_member, :as => :team_member, :url => @admin_team_member.new_record? ? admin_team_members_path(@admin_team_member) : admin_team_member_path(@admin_team_member) do |f|
+= form_for @admin_team_member, :as => :team_member, :url => admin_team_member_path(@admin_team_member) do |f|
-if @admin_team_member.errors.any?
- #error_explanation
- %h2= "#{pluralize(@admin_team_member.errors.count, "error")} prohibited this admin_project from being saved:"
+ .alert-message.block-message.error
%ul
- @admin_team_member.errors.full_messages.each do |msg|
%li= msg
- - if @admin_team_member.new_record?
- .span-6
- = f.label :user_id
- .span-6
- = f.select :user_id, User.all.map { |user| [user.name, user.id] }
- .span-6
- = f.label :project_id
- .span-6
- = f.select :project_id, Project.all.map { |user| [user.name, user.id] }
+ .clearfix
+ %label Project Access:
+ .input
+ = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, :class => "project-access-select"
- .span-6
- %b Project Access:
- .span-6
- = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, :class => "project-access-select"
-
- .span-6
- %b Repository Access:
- .span-6
- = f.select :repo_access, options_for_select(Repository.access_options, @admin_team_member.repo_access), {}, :class => "repo-access-select"
+ .clearfix
+ %label Repository Access:
+ .input
+ = f.select :repo_access, options_for_select(Repository.access_options, @admin_team_member.repo_access), {}, :class => "repo-access-select"
%br
.actions
- = f.submit 'Save', :class => "btn"
+ = f.submit 'Save', :class => "btn primary"
+ = link_to 'Cancel', :back, :class => "btn"
:css
form select {
diff --git a/app/views/admin/team_members/edit.html.haml b/app/views/admin/team_members/edit.html.haml
index 2f4832b86c0..431387be152 100644
--- a/app/views/admin/team_members/edit.html.haml
+++ b/app/views/admin/team_members/edit.html.haml
@@ -1,6 +1,19 @@
-= render 'form'
+%h3
+ Edit access
+ %small
+ = @admin_team_member.project.name
+ &ndash;
+ = @admin_team_member.user_name
-%br
-= link_to 'Show', admin_team_member_path(@admin_team_member)
-\|
-= link_to 'Back', admin_team_members_path
+%hr
+%table.zebra-striped
+ %tr
+ %td User:
+ %td= @admin_team_member.user_name
+ %tr
+ %td Project:
+ %td= @admin_team_member.project.name
+ %tr
+ %td Since:
+ %td= @admin_team_member.updated_at.stamp("Nov 11, 2010")
+= render 'form'
diff --git a/app/views/admin/team_members/index.html.haml b/app/views/admin/team_members/index.html.haml
deleted file mode 100644
index 8426c8638c6..00000000000
--- a/app/views/admin/team_members/index.html.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-- @admin_team_members.group_by(&:project).sort.each do |project, members|
- %h3= link_to project.name, [:admin, project]
- %table
- %thead
- %th Name
- %th Project Access
- %th Repo Access
- %th Added
- %th
- %th
- - members.each do |tm|
- - user = tm.user
- %tr
- %td.span-6
- = link_to tm.user_name, admin_team_member_path(tm)
- %br
- %br
- = tm.user_email
- %td.span-3= select_tag :project_access, options_for_select(Project.access_options, tm.project_access), :class => "project-access-select", :disabled => :disabled
- %td.span-3= select_tag :repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "repo-access-select", :disabled => :disabled
- %td.span-3= time_ago_in_words(tm.updated_at) + " ago"
- %td= link_to 'Edit', edit_admin_team_member_path(tm), :id => "edit_#{dom_id(tm)}"
- %td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
-
-%br
-
-= paginate @admin_team_members
-= link_to 'New Team Member', new_admin_team_member_path, :class => "btn"
diff --git a/app/views/admin/team_members/new.html.haml b/app/views/admin/team_members/new.html.haml
deleted file mode 100644
index c08ddc48eed..00000000000
--- a/app/views/admin/team_members/new.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%h1 New team member
-
-= render 'form'
-
-%br
-= link_to 'Back', admin_team_members_path
diff --git a/app/views/admin/team_members/show.html.haml b/app/views/admin/team_members/show.html.haml
deleted file mode 100644
index 8579b6afae0..00000000000
--- a/app/views/admin/team_members/show.html.haml
+++ /dev/null
@@ -1,26 +0,0 @@
-#infoblock
- %p
- %b Name:
- = @admin_team_member.user_name
- %p
- %b Project:
- = @admin_team_member.project.name
- %p
- %b Since:
- = @admin_team_member.updated_at.stamp("Nov 11, 2010")
-
-#infoblock
- .span-6
- %b Project Access:
- = select_tag :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), :class => "project-access-select", :disabled => true
-
- %br
- .span-6
- %b Repository Access:
- = select_tag :repo_access, options_for_select(Repository.access_options, @admin_team_member.repo_access), :class => "repo-access-select", :disabled => true
-
-%br
-
-= link_to 'Edit', edit_admin_team_member_path(@admin_project)
-\|
-= link_to 'Back', admin_team_members_path
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index b137ae3dbdc..bb54c184e78 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -18,9 +18,6 @@
.clearfix
= f.label :password_confirmation
.input= f.password_field :password_confirmation
- .clearfix
- = f.check_box :admin
- = f.label :admin
.clearfix
= f.label :projects_limit
@@ -35,8 +32,13 @@
.clearfix
= f.label :twitter
.input= f.text_field :twitter
- .clear
- %br
+ .clearfix
+ = f.label :admin do
+ = f.check_box :admin
+ %span Administrator
.actions
= f.submit 'Save', :class => "btn primary"
- = link_to 'Cancel', admin_users_path, :class => "btn"
+ - if @admin_user.new_record?
+ = link_to 'Cancel', admin_users_path, :class => "btn"
+ - else
+ = link_to 'Cancel', admin_user_path(@admin_user), :class => "btn"
diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml
index 2ccd2f72546..0e94be9e12c 100644
--- a/app/views/admin/users/edit.html.haml
+++ b/app/views/admin/users/edit.html.haml
@@ -1,6 +1,3 @@
+%h3= @admin_user.name
+%hr
= render 'form'
-
-%br
-= link_to 'Back', admin_users_path, :class => ""
-|
-= link_to 'Show', [:admin, @admin_user], :class => ""
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index b562a83183b..a0b4df1ff10 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -1,4 +1,8 @@
-%table
+%h3
+ Users
+ = link_to 'New User', new_admin_user_path, :class => "btn small right"
+%hr
+%table.zebra-striped
%thead
%th Admin
%th Name
@@ -13,9 +17,7 @@
%td= link_to user.name, [:admin, user]
%td= user.email
%td= user.users_projects.count
- %td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}"
- %td= link_to 'Destroy', [:admin, user], :confirm => 'Are you sure?', :method => :delete
+ %td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}", :class => "btn small"
+ %td= link_to 'Destroy', [:admin, user], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger"
= paginate @admin_users
-%br
-= link_to 'New User', new_admin_user_path, :class => "btn"
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index 755ee353c08..cf86fb12112 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -1,6 +1,10 @@
-%h2= @admin_user.name
+%h3
+ = @admin_user.name
+ = link_to 'Edit', edit_admin_user_path(@admin_user), :class => "btn small right"
-%table.round-borders
+%hr
+
+%table.zebra-striped
%tr
%td
%b
@@ -39,31 +43,57 @@
Twitter:
%td
= @admin_user.twitter
- %tr
- %td{:colspan => 2}
- = link_to 'Edit', edit_admin_user_path(@admin_user), :class => "btn"
-.span-14
- %h2 Projects
+%h3 Projects
+%hr
+
+%table.zebra-striped
+ %tr
+ %thead
+ %th Name
+ %th Project Access
+ %th Repository Access
+ %th
+ %th
- %table.round-borders
+ - @admin_user.users_projects.each do |tm|
+ - project = tm.project
%tr
- %thead
- %th Name
- %th Added
- %th Project Access
- %th Repository Access
- %th
- %th
+ %td= link_to project.name, admin_project_path(project)
+ %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "medium project-access-select", :disabled => :disabled
+ %td= select_tag :tm_repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "medium repo-access-select", :disabled => :disabled
+ %td= link_to 'Edit Access', edit_admin_team_member_path(tm), :class => "btn small"
+ %td= link_to 'Remove from team', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger"
- - @admin_user.users_projects.each do |tm|
- - project = tm.project
+= form_tag team_update_admin_user_path(@admin_user), :class => "bulk_import", :method => :put do
+ %table
+ %thead
%tr
- %td= link_to project.name, admin_project_path(project)
- %td= time_ago_in_words(tm.updated_at) + " ago"
- %td= select_tag :project_access, options_for_select(Project.access_options, tm.project_access), :class => "project-access-select", :disabled => :disabled
- %td= select_tag :repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "repo-access-select", :disabled => :disabled
- %td= link_to 'Edit', edit_admin_team_member_path(tm)
- %td= link_to 'Cancel', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
+ %th Projects
+ %th Project Access:
+ %th Repo Access:
+
+ %tr
+ %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name), :multiple => true
+ %td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select"
+ %td= select_tag :repo_access, options_for_select(Repository.access_options), :class => "repo-access-select"
+
+ .actions
+ = submit_tag 'Add', :class => "btn primary"
+
+
+:css
+ form select {
+ width:150px;
+ }
+
+ #project_ids {
+ width:300px;
+ }
+
+
+:javascript
+ $('select#project_ids').chosen();
+ $('select#repo_access').chosen();
+ $('select#project_access').chosen();
- = link_to 'Add To Another Project', new_admin_team_member_path(:team_member => {:user_id => @admin_user.id}), :class => "btn"
diff --git a/app/views/kaminari/_first_page.html.haml b/app/views/kaminari/_first_page.html.haml
new file mode 100644
index 00000000000..fee8112f6af
--- /dev/null
+++ b/app/views/kaminari/_first_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "First" page
+-# available local variables
+-# url: url to the first page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.first
+ = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote
diff --git a/app/views/kaminari/_gap.html.haml b/app/views/kaminari/_gap.html.haml
new file mode 100644
index 00000000000..f82f185ac35
--- /dev/null
+++ b/app/views/kaminari/_gap.html.haml
@@ -0,0 +1,8 @@
+-# Non-link tag that stands for skipped pages...
+-# available local variables
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.page.gap
+ = raw(t 'views.pagination.truncate')
diff --git a/app/views/kaminari/_last_page.html.haml b/app/views/kaminari/_last_page.html.haml
new file mode 100644
index 00000000000..6e41d232b51
--- /dev/null
+++ b/app/views/kaminari/_last_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "Last" page
+-# available local variables
+-# url: url to the last page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.last
+ = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote}
diff --git a/app/views/kaminari/_next_page.html.haml b/app/views/kaminari/_next_page.html.haml
new file mode 100644
index 00000000000..76f40e72373
--- /dev/null
+++ b/app/views/kaminari/_next_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "Next" page
+-# available local variables
+-# url: url to the next page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%li.next
+ = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
diff --git a/app/views/kaminari/_page.html.haml b/app/views/kaminari/_page.html.haml
new file mode 100644
index 00000000000..5966812934f
--- /dev/null
+++ b/app/views/kaminari/_page.html.haml
@@ -0,0 +1,10 @@
+-# Link showing page number
+-# available local variables
+-# page: a page object for "this" page
+-# url: url to this page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%li{:class => "page#{' active' if page.current?}"}
+ = link_to page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
diff --git a/app/views/kaminari/_paginator.html.haml b/app/views/kaminari/_paginator.html.haml
new file mode 100644
index 00000000000..6f9fb332261
--- /dev/null
+++ b/app/views/kaminari/_paginator.html.haml
@@ -0,0 +1,17 @@
+-# The container tag
+-# available local variables
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+-# paginator: the paginator that renders the pagination tags inside
+= paginator.render do
+ %div.pagination
+ %ul
+ = prev_page_tag unless current_page.first?
+ - each_page do |page|
+ - if page.left_outer? || page.right_outer? || page.inside_window?
+ = page_tag page
+ - elsif !page.was_truncated?
+ = gap_tag
+ = next_page_tag unless current_page.last?
diff --git a/app/views/kaminari/_prev_page.html.haml b/app/views/kaminari/_prev_page.html.haml
new file mode 100644
index 00000000000..cef885ee0af
--- /dev/null
+++ b/app/views/kaminari/_prev_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "Previous" page
+-# available local variables
+-# url: url to the previous page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%li{:class => "prev" }
+ = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
diff --git a/app/views/layouts/_app_side.html.haml b/app/views/layouts/_app_side.html.haml
index b4a97c5ad69..3c34f18880f 100644
--- a/app/views/layouts/_app_side.html.haml
+++ b/app/views/layouts/_app_side.html.haml
@@ -4,7 +4,4 @@
= link_to "Projects", projects_path, :class => "#{"active" if current_page?(projects_path)}"
= link_to "Issues", dashboard_issues_path, :class => "#{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide"
= link_to "Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide"
- - if current_user.is_admin?
- = link_to admin_root_path, :class => "admin", :title => "Admin" do
- Admin
= link_to "Help", help_path, :class => "#{"active" if controller.controller_name == "help"}"
diff --git a/app/views/layouts/_projects_side.html.haml b/app/views/layouts/_projects_side.html.haml
index a55d00045eb..4c35c62649b 100644
--- a/app/views/layouts/_projects_side.html.haml
+++ b/app/views/layouts/_projects_side.html.haml
@@ -4,8 +4,16 @@
You can create at least
= current_user.projects_limit
projects. Click on button to add a new one
- = link_to new_project_path, :class => "btn small" do
- New Project
+ .alert-actions
+ = link_to new_project_path, :class => "btn small" do
+ New Project »
+
+ - if current_user.is_admin?
+ .alert-message.block-message.info
+ You have administrator privilegies. You can configure application following this button:
+ .alert-actions
+ = link_to admin_root_path, :class => "btn small", :title => "Admin" do
+ Visit Admin Area »
- if current_user.projects.count > 0
%div.entry
@@ -18,21 +26,5 @@
= project.name
= link_to "More » ", projects_path
- -#%h5
- -#Your Issues:
- -#%ul
- -#- current_user.assigned_issues.order("id DESC").limit(5).each do |issue|
- -#%li
- -#= link_to project_issue_path(issue.project, issue) do
- -#= truncate issue.title
-
-
- -#%h5
- -#Your Merge Requests:
- -#%ul
- -#- current_user.assigned_merge_requests.order("id DESC").limit(5).each do |issue|
- -#%li
- -#= link_to project_merge_request_path(issue.project, issue) do
- -#= truncate issue.title
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml
index df4e917cf38..18eb9972e40 100644
--- a/app/views/layouts/admin.html.haml
+++ b/app/views/layouts/admin.html.haml
@@ -10,7 +10,6 @@
%aside
= link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil
= link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil
- = link_to "Teams", admin_team_members_path, :class => controller.controller_name == "team_members" ? "current" : nil
= link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil
= link_to "Resque", "/info/resque"
diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml
index 723b6413d55..2c2249bf0d2 100644
--- a/app/views/profile/show.html.haml
+++ b/app/views/profile/show.html.haml
@@ -28,5 +28,6 @@
= f.label :twitter
.input= f.text_field :twitter
- = f.submit 'Save', :class => "primary btn"
+ .actions
+ = f.submit 'Save', :class => "primary btn"