Merge branch 'dev' into user_dashboard

This commit is contained in:
gitlabhq 2011-11-02 20:59:06 +02:00
commit 83c1194d52
15 changed files with 67 additions and 20 deletions

View file

@ -1,4 +1,5 @@
class Admin::MailerController < ApplicationController
layout "admin"
before_filter :authenticate_user!
before_filter :authenticate_admin!

View file

@ -1,4 +1,5 @@
class Admin::ProjectsController < ApplicationController
layout "admin"
before_filter :authenticate_user!
before_filter :authenticate_admin!

View file

@ -1,4 +1,5 @@
class Admin::TeamMembersController < ApplicationController
layout "admin"
before_filter :authenticate_user!
before_filter :authenticate_admin!

View file

@ -1,4 +1,5 @@
class Admin::UsersController < ApplicationController
layout "admin"
before_filter :authenticate_user!
before_filter :authenticate_admin!

View file

@ -1,4 +1,5 @@
class KeysController < ApplicationController
layout "profile"
respond_to :js
def index

View file

@ -1,4 +1,5 @@
class ProfileController < ApplicationController
layout "profile"
def show
@user = current_user
end

View file

@ -28,6 +28,8 @@ module ApplicationHelper
else
"Never"
end
rescue
"Never"
end
def markdown(text)

View file

@ -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

View file

@ -1,5 +1,5 @@
%table
%tr
%thead
%th Name
%th Code
%th Path

View file

@ -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

View file

@ -1,5 +1,5 @@
%table
%tr
%thead
%th Admin
%th Name
%th Email

View 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

View file

@ -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

View 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

View file

@ -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