Bootstrap: Deploy keys, Hooks
This commit is contained in:
parent
089dca4d6c
commit
15b06b0164
6 changed files with 68 additions and 94 deletions
|
@ -1,18 +1,18 @@
|
|||
%div
|
||||
= form_for [@project, @key], :url => project_deploy_keys_path do |f|
|
||||
-if @key.errors.any?
|
||||
%ul.errors_holder
|
||||
- @key.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
%table.no-borders
|
||||
%tr
|
||||
%td= f.label :title
|
||||
%td= f.text_field :title, :style => "width:300px"
|
||||
%tr
|
||||
%td= f.label :key
|
||||
%td= f.text_area :key, :style => "width:300px; height:130px"
|
||||
%br
|
||||
.merge-tabs
|
||||
= f.submit 'Save', :class => "primary btn"
|
||||
.alert-message.block-message.error
|
||||
%ul
|
||||
- @key.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.clearfix
|
||||
= f.label :title
|
||||
.input= f.text_field :title
|
||||
.clearfix
|
||||
= f.label :key
|
||||
.input= f.text_area :key, :class => "xlarge"
|
||||
.actions
|
||||
= f.submit 'Save', :class => "primary btn"
|
||||
= link_to "Cancel", project_deploy_keys_path(@project), :class => "btn"
|
||||
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
= render "repositories/head"
|
||||
- if can? current_user, :admin_project, @project
|
||||
.alert-message.block-message.info
|
||||
Deploy keys allow read-only access to repository.
|
||||
= link_to new_project_deploy_key_path(@project), :class => "btn small", :title => "New Deploy Key" do
|
||||
Add Deploy Key
|
||||
|
||||
%div#keys-table{ :class => "update-data ui-box ui-box-small ui-box-big" }
|
||||
.data
|
||||
- @keys.each do |key|
|
||||
= render(:partial => 'show', :locals => {:key => key})
|
||||
|
||||
- if @keys.blank?
|
||||
.notice_holder
|
||||
%li Deploy Keys do not exist yet.
|
||||
- if can? current_user, :admin_project, @project
|
||||
%li You can add a new one by clicking on "Add New" button
|
||||
|
||||
:javascript
|
||||
$('.delete-key').live('ajax:success', function() {
|
||||
$(this).closest('.update-item').fadeOut(); });
|
||||
|
||||
%ul.unstyled
|
||||
- @keys.each do |key|
|
||||
%li= render(:partial => 'show', :locals => {:key => key})
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
.ui-box.width-100p
|
||||
%h3= @key.title
|
||||
.data
|
||||
%pre= @key.key
|
||||
.clear
|
||||
.buttons
|
||||
= link_to 'Remove', project_deploy_key_path(@key.project, @key), :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right"
|
||||
.clear
|
||||
|
||||
|
||||
= render "repositories/head"
|
||||
%h3= @key.title
|
||||
%hr
|
||||
%pre= @key.key
|
||||
.actions
|
||||
= link_to 'Remove', project_deploy_key_path(@key.project, @key), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn delete-key"
|
||||
.clear
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue