Skip to content

Instantly share code, notes, and snippets.

@gotva
Created January 23, 2014 06:04
Show Gist options
  • Save gotva/8573700 to your computer and use it in GitHub Desktop.
Save gotva/8573700 to your computer and use it in GitHub Desktop.
One of the way to patch hook index page for gitlab
-if @hooks.any?
.ui-box
.title
Web hooks (#{@hooks.count})
%ul.well-list
- @hooks.each do |hook|
- if hook.persisted?
%li
.pull-right
= link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"
= link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small grouped"
.clearfix
%span.monospace= hook.url
%p
- %w(push_events issues_events merge_requests_events).each do |trigger|
- if hook.send(trigger)
%span.label.label-gray= trigger.titleize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment