Bootstrap: Deploy keys, Hooks

This commit is contained in:
Dmitriy Zaporozhets 2012-01-28 12:40:17 +02:00
parent 089dca4d6c
commit 15b06b0164
6 changed files with 68 additions and 94 deletions

View file

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

View file

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