From 15b06b01644f31314f3241afbb7a807219f18703 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 28 Jan 2012 12:40:17 +0200 Subject: Bootstrap: Deploy keys, Hooks --- app/views/hooks/index.html.haml | 37 +++++++++++++++---------------------- app/views/hooks/show.html.haml | 12 ++++-------- 2 files changed, 19 insertions(+), 30 deletions(-) (limited to 'app/views/hooks') diff --git a/app/views/hooks/index.html.haml b/app/views/hooks/index.html.haml index 3bff76f47c0..d00b0677621 100644 --- a/app/views/hooks/index.html.haml +++ b/app/views/hooks/index.html.haml @@ -1,25 +1,18 @@ = render "repositories/head" -- unless @hooks.empty? - %div.update-data.ui-box.ui-box-small - .data - - @hooks.each do |hook| - %a.update-item{:href => project_hook_path(@project, hook)} - %span.update-title{:style => "margin-bottom:0px;"} - = hook.url - %span.update-author.right - Added - = time_ago_in_words(hook.created_at) - ago -- else - %h3 No hooks -.clear -%hr -%p - Post receive hooks. For now only POST request allowed. We send some data with request. Example below +- if can? current_user, :admin_project, @project + .alert-message.block-message.info + Post receive hooks for binding events when someone push to repository. + = link_to new_project_hook_path(@project), :class => "btn small", :title => "New Web Hook" do + Add Post Receive Hook -.view_file - .view_file_header - %strong POST data passed - .data.no-padding - = render "data_ex" +%ul.unstyled + - @hooks.each do |hook| + %li + %a.update-item{:href => project_hook_path(@project, hook)} + = hook.url + +.alert-message.block-message.info + We send some data with POST request when someone makes git push + +.well= render "data_ex" diff --git a/app/views/hooks/show.html.haml b/app/views/hooks/show.html.haml index 47c1ddeac40..5ec4d5d8758 100644 --- a/app/views/hooks/show.html.haml +++ b/app/views/hooks/show.html.haml @@ -1,11 +1,7 @@ = render "repositories/head" -%h3 - %span.commit.tag POST - = @hook.url - +%pre= @hook.url - if can? current_user, :admin_project, @project - .merge-tabs - = link_to 'Test Hook', test_project_hook_path(@project, @hook), :class => "grey-button" - .right - = link_to 'Remove', project_hook_path(@project, @hook), :confirm => 'Are you sure?', :method => :delete, :class => "red-button" + .actions + = link_to 'Test Hook', test_project_hook_path(@project, @hook), :class => "btn" + = link_to 'Remove', project_hook_path(@project, @hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn" -- cgit v1.2.1