Bootstrap: Issues, Merge Requests, SSH Key completed

This commit is contained in:
Dmitriy Zaporozhets 2012-01-29 23:59:12 +02:00
parent 20721eff1c
commit fca1ffb888
32 changed files with 213 additions and 1010 deletions

View file

@ -1,16 +1,18 @@
%div
= form_for @key, :remote => true do |f|
= form_for @key do |f|
-if @key.errors.any?
%ul
- @key.errors.full_messages.each do |msg|
%li= msg
.alert-message.block-message.error
%ul
- @key.errors.full_messages.each do |msg|
%li= msg
.form-row
.clearfix
= f.label :title
= f.text_field :title, :style => "width:300px"
.form-row
.input= f.text_field :title
.clearfix
= f.label :key
= f.text_area :key, :style => "width:300px; height:130px"
.form-row
= f.submit 'Save', :class => "grey-button"
.input= f.text_area :key, :class => "xlarge"
.actions
= f.submit 'Save', :class => "primary btn"
= link_to "Cancel", keys_path, :class => "btn"

View file

@ -1,7 +1,7 @@
%a.update-item{:href => key_path(key)}
%span.update-title
= key.title
%span.update-author
Added
= time_ago_in_words(key.created_at)
ago
%li.entry
= link_to key_path(key) do
%strong= key.title
%span.right.cgray
Added
= time_ago_in_words(key.created_at)
ago

View file

@ -1,16 +1,10 @@
%h2.icon
%span>
%h3
SSH Keys
%div#new-key-holder.right
= link_to "Add new", new_key_path, :remote => true, :class => "grey-button"
%br
= link_to "Add new", new_key_path, :class => "btn small right"
%hr
%div#keys-table{ :class => "update-data ui-box ui-box-small ui-box-big" }
.data
%ul.unstyled
- @keys.each do |key|
= render(:partial => 'show', :locals => {:key => key})
:javascript
$('.delete-key').live('ajax:success', function() {
$(this).closest('.update-item').fadeOut(); });

View file

@ -1,5 +1,3 @@
%h1 New key
%h3 New key
%hr
= render 'form'
= link_to 'Back', keys_path

View file

@ -1,10 +1,7 @@
.ui-box.width-100p
%h3= @key.title
.data
%pre= @key.key
.clear
.buttons
= link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right"
.clear
%h3= @key.title
%hr
%pre= @key.key
.actions
= link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger delete-key"