<% if Webhook.where(:project_id => @project.id).first%>
<% Webhook.where(:project_id => @project.id).each do |webhook|%> <%= form_tag(update_webhook_path(@project, webhook.id), :method => :put, :class => "tabular") do %> URL <%= text_field_tag :url, webhook.url, :size => 80 %> <%= text_field_tag :auth_type, webhook.auth_type, :size => 80 %> <%= text_field_tag :username, webhook.username, :size => 80 %> <%= text_field_tag :password, webhook.password, :size => 80 %> <%= text_field_tag :token, webhook.token, :size => 80 %> <%= submit_tag l(:button_update) %> <% end %> <%= link_to l(:button_delete), delete_webhook_path(@project, webhook.id), :class => "icon icon-del", :method => :delete, :confirm => l(:text_are_you_sure) %>
<% end %>
<% end %> <%= form_tag(create_webhook_path(@project), :method => :post, :class => "tabular") do %>
URL <%= text_field_tag :url, '', :size => 80 %> <%= text_field_tag :auth_type, '', :size => 80 %> <%= text_field_tag :username, '', :size => 80 %> <%= text_field_tag :password, '', :size => 80 %> <%= text_field_tag :token, '', :size => 80 %> <%= submit_tag l(:button_add) %>
<% end %>