diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:07:50 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:25:15 -0400 |
commit | 775418918782d5284000ed0bfea364458c748567 (patch) | |
tree | c31e3633a3bcbed17b000f0165cf35edad41f7ca /app/views/layouts | |
parent | 1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff) | |
download | gitlab-ce-775418918782d5284000ed0bfea364458c748567.tar.gz |
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_app_menu.html.haml | 12 | ||||
-rw-r--r-- | app/views/layouts/_flash.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/_head.html.haml | 8 | ||||
-rw-r--r-- | app/views/layouts/_head_panel.html.haml | 16 | ||||
-rw-r--r-- | app/views/layouts/_project_menu.html.haml | 18 | ||||
-rw-r--r-- | app/views/layouts/admin.html.haml | 18 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 8 | ||||
-rw-r--r-- | app/views/layouts/devise_layout.html.haml | 4 | ||||
-rw-r--r-- | app/views/layouts/error.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/notify.html.haml | 28 | ||||
-rw-r--r-- | app/views/layouts/profile.html.haml | 16 | ||||
-rw-r--r-- | app/views/layouts/project.html.haml | 8 |
12 files changed, 72 insertions, 72 deletions
diff --git a/app/views/layouts/_app_menu.html.haml b/app/views/layouts/_app_menu.html.haml index 6575ee99168..025314891f8 100644 --- a/app/views/layouts/_app_menu.html.haml +++ b/app/views/layouts/_app_menu.html.haml @@ -1,19 +1,19 @@ %ul.main_menu - %li.home{:class => tab_class(:root)} - = link_to "Home", root_path, :title => "Home" + %li.home{class: tab_class(:root)} + = link_to "Home", root_path, title: "Home" - %li{:class => tab_class(:dash_issues)} + %li{class: tab_class(:dash_issues)} = link_to dashboard_issues_path do Issues %span.count= current_user.assigned_issues.opened.count - %li{:class => tab_class(:dash_mr)} + %li{class: tab_class(:dash_mr)} = link_to dashboard_merge_requests_path do Merge Requests %span.count= current_user.cared_merge_requests.count - %li{:class => tab_class(:search)} + %li{class: tab_class(:search)} = link_to "Search", search_path - %li{:class => tab_class(:help)} + %li{class: tab_class(:help)} = link_to "Help", help_path diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml index 2e40f0a6281..86564ad7110 100644 --- a/app/views/layouts/_flash.html.haml +++ b/app/views/layouts/_flash.html.haml @@ -1,6 +1,6 @@ - if alert || notice - text = alert || notice - %div{:style => "display:none", :id => "flash_container"} + %div{style: "display:none", id: "flash_container"} %center %h4= text :javascript diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index e609557b17a..3a2586a3d38 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -1,5 +1,5 @@ %head - %meta{:charset => "utf-8"} + %meta{charset: "utf-8"} %title GitLab = " > #{@project.name}" if @project && !@project.new_record? @@ -9,10 +9,10 @@ -# Atom feed - if controller_name == 'projects' && action_name == 'index' - = auto_discovery_link_tag :atom, projects_url(:atom, :private_token => current_user.private_token), :title => "Dashboard feed" + = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" - if @project && !@project.new_record? - if current_page?(tree_project_ref_path(@project, @project.root_ref)) || current_page?(project_commits_path(@project)) - = auto_discovery_link_tag(:atom, project_commits_url(@project, :atom, :ref => @ref, :private_token => current_user.private_token), :title => "Recent commits to #{@project.name}:#{@ref}") + = auto_discovery_link_tag(:atom, project_commits_url(@project, :atom, ref: @ref, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") - if request.path == project_issues_path(@project) - = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, :private_token => current_user.private_token), :title => "#{@project.name} issues") + = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") = csrf_meta_tags diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 9e019021c89..d6247d36b0d 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -3,30 +3,30 @@ .container .top_panel_content %div.app_logo - = link_to root_path, :class => "home", :title => "Home" do + = link_to root_path, class: "home", title: "Home" do %h1 GITLAB %span.separator %h1.project_name= title .search - = form_tag search_path, :method => :get do |f| - = text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" + = form_tag search_path, method: :get do |f| + = text_field_tag "search", nil, placeholder: "Search", class: "search-input" .fbtn - if current_user.is_admin? - = link_to admin_root_path, :class => "btn small", :title => "Admin area" do + = link_to admin_root_path, class: "btn small", title: "Admin area" do %i.icon-cog Admin - if current_user.can_create_project? - = link_to new_project_path, :class => "btn small", :title => "Create New Project" do + = link_to new_project_path, class: "btn small", title: "Create New Project" do %i.icon-plus Project .account-box - = link_to profile_path, :class => "pic" do + = link_to profile_path, class: "pic" do = image_tag gravatar_icon(current_user.email) .account-links - = link_to profile_path, :class => "username" do + = link_to profile_path, class: "username" do My profile - = link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete + = link_to 'Logout', destroy_user_session_path, class: "logout", method: :delete :javascript $(function(){ diff --git a/app/views/layouts/_project_menu.html.haml b/app/views/layouts/_project_menu.html.haml index 3f58fc5a664..04eaec5accc 100644 --- a/app/views/layouts/_project_menu.html.haml +++ b/app/views/layouts/_project_menu.html.haml @@ -1,37 +1,37 @@ %ul.main_menu - %li.home{:class => project_tab_class} - = link_to @project.code, project_path(@project), :title => "Project" + %li.home{class: project_tab_class} + = link_to @project.code, project_path(@project), title: "Project" - if @project.repo_exists? - if can? current_user, :download_code, @project - %li{:class => tree_tab_class} + %li{class: tree_tab_class} = link_to tree_project_ref_path(@project, @project.root_ref) do Files - %li{:class => commit_tab_class} + %li{class: commit_tab_class} = link_to "Commits", project_commits_path(@project) - %li{:class => tab_class(:network)} + %li{class: tab_class(:network)} = link_to "Network", graph_project_path(@project) - if @project.issues_enabled - %li{:class => tab_class(:issues)} + %li{class: tab_class(:issues)} = link_to project_issues_filter_path(@project) do Issues %span.count.issue_counter= @project.issues.opened.count - if @project.repo_exists? - if @project.merge_requests_enabled - %li{:class => tab_class(:merge_requests)} + %li{class: tab_class(:merge_requests)} = link_to project_merge_requests_path(@project) do Merge Requests %span.count.merge_counter= @project.merge_requests.opened.count - if @project.wall_enabled - %li{:class => tab_class(:wall)} + %li{class: tab_class(:wall)} = link_to wall_project_path(@project) do Wall - if @project.wiki_enabled - %li{:class => tab_class(:wiki)} + %li{class: tab_class(:wiki)} = link_to project_wiki_path(@project, :index) do Wiki diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 69304edef3a..fa4ec6c938e 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -1,22 +1,22 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} admin"} + %body{class: "#{app_theme} admin"} = render "layouts/flash" - = render "layouts/head_panel", :title => "Admin area" + = render "layouts/head_panel", title: "Admin area" .container %ul.main_menu - %li.home{:class => tab_class(:admin_root)} + %li.home{class: tab_class(:admin_root)} = link_to "Stats", admin_root_path - %li{:class => tab_class(:admin_projects)} + %li{class: tab_class(:admin_projects)} = link_to "Projects", admin_projects_path - %li{:class => tab_class(:admin_users)} + %li{class: tab_class(:admin_users)} = link_to "Users", admin_users_path - %li{:class => tab_class(:admin_logs)} + %li{class: tab_class(:admin_logs)} = link_to "Logs", admin_logs_path - %li{:class => tab_class(:admin_emails)} + %li{class: tab_class(:admin_emails)} = link_to "Hooks", admin_hooks_path - %li{:class => tab_class(:admin_resque)} + %li{class: tab_class(:admin_resque)} = link_to "Resque", admin_resque_path .content= yield diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 0d5d829e00d..dda10d5d137 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,10 +1,10 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} application"} + %body{class: "#{app_theme} application"} = render "layouts/flash" - = render "layouts/head_panel", :title => "Dashboard" + = render "layouts/head_panel", title: "Dashboard" .container - = render :partial => "layouts/app_menu" + = render partial: "layouts/app_menu" .content = yield diff --git a/app/views/layouts/devise_layout.html.haml b/app/views/layouts/devise_layout.html.haml index c293734b368..70c4f007ba1 100644 --- a/app/views/layouts/devise_layout.html.haml +++ b/app/views/layouts/devise_layout.html.haml @@ -1,6 +1,6 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" %body.ui_basic.login-page - = render :partial => "layouts/flash" + = render partial: "layouts/flash" .container= yield diff --git a/app/views/layouts/error.html.haml b/app/views/layouts/error.html.haml index 943dbe778c4..a512c4a58aa 100644 --- a/app/views/layouts/error.html.haml +++ b/app/views/layouts/error.html.haml @@ -1,9 +1,9 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} application"} + %body{class: "#{app_theme} application"} = render "layouts/flash" - = render "layouts/head_panel", :title => "" + = render "layouts/head_panel", title: "" .container .content %br diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index bebcf82dab8..a1938df43a1 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -1,6 +1,6 @@ -%html{:lang => "en"} +%html{lang: "en"} %head - %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"} + %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"} %title gitlabhq :css @@ -11,28 +11,28 @@ .content a {color: #0eb6ce; text-decoration: none;} .footer p {font-size: 11px; color:#7d7a7a; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;} .footer a {color: #0eb6ce; text-decoration: none;} - %body{:bgcolor => "#EAEAEA", :style => "margin: 0; padding: 0; background: #EAEAEA"} - %table{:align => "center", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "padding: 35px 0; background: #EAEAEA;", :width => "100%"} + %body{bgcolor: "#EAEAEA", style: "margin: 0; padding: 0; background: #EAEAEA"} + %table{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 35px 0; background: #EAEAEA;", width: "100%"} %tr - %td{:align => "center", :style => "margin: 0; padding: 0; background: #EAEAEA;"} - %table.header{:align => "center", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "font-family: Helvetica, Arial, sans-serif; background:#333", :width => "600"} + %td{align: "center", style: "margin: 0; padding: 0; background: #EAEAEA;"} + %table.header{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background:#333", width: "600"} %tr - %td{:style => "font-size: 0px;", :width => "20"} + %td{style: "font-size: 0px;", width: "20"} \ - %td{:align => "left", :style => "padding: 18px 0 10px;", :width => "580"} - %h1{:style => "color: #BBBBBB; font: normal 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;"} + %td{align: "left", style: "padding: 18px 0 10px;", width: "580"} + %h1{style: "color: #BBBBBB; font: normal 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;"} gitlab - if @project | #{@project.name} - %table{:align => "center", :bgcolor => "#fff", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "font-family: Helvetica, Arial, sans-serif; background: #fff;", :width => "600"} + %table{align: "center", bgcolor: "#fff", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background: #fff;", width: "600"} %tr= yield %tr - %td{:align => "left", :colspan => "2", :height => "3", :style => "padding: font-size: 0; line-height: 0; height: 3px;", :width => "600"} - %table.footer{:align => "center", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "font-family: Helvetica, Arial, sans-serif; line-height: 10px;", :width => "600"} + %td{align: "left", colspan: "2", height: "3", style: "padding: font-size: 0; line-height: 0; height: 3px;", width: "600"} + %table.footer{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; line-height: 10px;", width: "600"} %tr - %td{:align => "center", :style => "padding: 5px 0 10px; font-size: 11px; color:#7d7a7a; margin: 0; line-height: 1.2;font-family: Helvetica, Arial, sans-serif;", :valign => "top"} + %td{align: "center", style: "padding: 5px 0 10px; font-size: 11px; color:#7d7a7a; margin: 0; line-height: 1.2;font-family: Helvetica, Arial, sans-serif;", valign: "top"} %br - %p{:style => "font-size: 11px; color:#7d7a7a; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;"} + %p{style: "font-size: 11px; color:#7d7a7a; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;"} You're receiving this notification because you are a member of the - if @project #{@project.name} diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 957a68bf482..b624415dfe1 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -1,26 +1,26 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} profile"} + %body{class: "#{app_theme} profile"} = render "layouts/flash" - = render "layouts/head_panel", :title => "Profile" + = render "layouts/head_panel", title: "Profile" .container %ul.main_menu - %li.home{:class => tab_class(:profile)} + %li.home{class: tab_class(:profile)} = link_to "Profile", profile_path - %li{:class => tab_class(:password)} + %li{class: tab_class(:password)} = link_to "Password", profile_password_path - %li{:class => tab_class(:ssh_keys)} + %li{class: tab_class(:ssh_keys)} = link_to keys_path do SSH Keys %span.count= current_user.keys.count - %li{:class => tab_class(:token)} + %li{class: tab_class(:token)} = link_to "Token", profile_token_path - %li{:class => tab_class(:design)} + %li{class: tab_class(:design)} = link_to "Design", profile_design_path diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index d9843c65fce..56a947d2a9d 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -1,11 +1,11 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} project"} + %body{class: "#{app_theme} project"} = render "layouts/flash" - = render "layouts/head_panel", :title => @project.name + = render "layouts/head_panel", title: @project.name .container - = render :partial => "layouts/project_menu" + = render partial: "layouts/project_menu" .content = yield |