Merge branch 'dev' into user_dashboard
This commit is contained in:
commit
83c1194d52
15 changed files with 67 additions and 20 deletions
|
@ -1,4 +1,5 @@
|
|||
class Admin::MailerController < ApplicationController
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :authenticate_admin!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class Admin::ProjectsController < ApplicationController
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :authenticate_admin!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class Admin::TeamMembersController < ApplicationController
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :authenticate_admin!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class Admin::UsersController < ApplicationController
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :authenticate_admin!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class KeysController < ApplicationController
|
||||
layout "profile"
|
||||
respond_to :js
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class ProfileController < ApplicationController
|
||||
layout "profile"
|
||||
def show
|
||||
@user = current_user
|
||||
end
|
||||
|
|
|
@ -28,6 +28,8 @@ module ApplicationHelper
|
|||
else
|
||||
"Never"
|
||||
end
|
||||
rescue
|
||||
"Never"
|
||||
end
|
||||
|
||||
def markdown(text)
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
%div.top_project_menu
|
||||
%span= link_to "Users", admin_users_path, :style => "width:50px;", :class => controller.controller_name == "users" ? "current" : nil
|
||||
%span= link_to "Projects", admin_projects_path, :style => "width:50px;", :class => controller.controller_name == "projects" ? "current" : nil
|
||||
%span= link_to "Teams", admin_team_members_path, :style => "width:50px;", :class => controller.controller_name == "team_members" ? "current" : nil
|
||||
%span= link_to "Emails", admin_emails_path, :style => "width:50px;", :class => controller.controller_name == "mailer" ? "current" : nil
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
%table
|
||||
%tr
|
||||
%thead
|
||||
%th Name
|
||||
%th Code
|
||||
%th Path
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- @admin_team_members.group_by(&:project).sort.each do |project, members|
|
||||
%h3= link_to project.name, [:admin, project]
|
||||
%table
|
||||
%tr
|
||||
%thead
|
||||
%th Name
|
||||
%th Email
|
||||
%th Read
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%table
|
||||
%tr
|
||||
%thead
|
||||
%th Admin
|
||||
%th Name
|
||||
%th Email
|
||||
|
|
27
app/views/layouts/admin.html.haml
Normal file
27
app/views/layouts/admin.html.haml
Normal file
|
@ -0,0 +1,27 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body{ :class => content_for?(:body_class) ? yield(:body_class) : 'project-page', :id => yield(:boyd_id)}
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
.project-container
|
||||
.project-sidebar
|
||||
.fixed
|
||||
%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
|
||||
|
||||
.project-content
|
||||
= yield
|
|
@ -19,11 +19,5 @@
|
|||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
%div{ :id => "main", :role => "main", :class => "container_4" }
|
||||
- if @project && !@project.new_record?
|
||||
.top_bar.container= render :partial => "projects/top_menu"
|
||||
- if ["keys", "profile"].include?(controller.controller_name)
|
||||
.top_bar.container= render :partial => "profile/top_menu"
|
||||
- if admin_namespace?
|
||||
.top_bar.container= render :partial => "admin/top_menu"
|
||||
= render :partial => "layouts/page_title"
|
||||
= yield
|
||||
|
|
29
app/views/layouts/profile.html.haml
Normal file
29
app/views/layouts/profile.html.haml
Normal file
|
@ -0,0 +1,29 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body{ :class => content_for?(:body_class) ? yield(:body_class) : 'project-page', :id => yield(:boyd_id)}
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
.project-container
|
||||
.project-sidebar
|
||||
.fixed
|
||||
%aside
|
||||
= link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil
|
||||
= link_to "Password", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
|
||||
= link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
|
||||
Keys
|
||||
- unless current_user.keys.empty?
|
||||
%span{ :class => "number" }= current_user.keys.count
|
||||
|
||||
.project-content
|
||||
= yield
|
|
@ -1,5 +0,0 @@
|
|||
%div.top_project_menu
|
||||
%span= link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil
|
||||
%span= link_to "Password", profile_password_path, :style => "width:70px;", :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
|
||||
%span= link_to "Keys", keys_path, :class => controller.controller_name == "keys" ? "current" : nil
|
||||
|
Loading…
Reference in a new issue