User profile restyle. Feed(Atom) links for commits & issues

This commit is contained in:
Dmitriy Zaporozhets 2011-12-19 23:32:59 +02:00
parent 54fb0f8589
commit a2d3b21189
16 changed files with 147 additions and 92 deletions

View file

@ -1,4 +1,7 @@
%tr
%td= truncate key.title, :lenght => 12
%td= truncate key.key, :lenght => 1114
%td= link_to 'Cancel', key, :confirm => 'Are you sure?', :method => :delete, :class => "grey-button negative delete-key", :id => "destroy_key_#{key.id}", :remote => true
%a.update-item{:href => key_path(key)}
%span.update-title
= key.title
%span.update-author
Added
= time_ago_in_words(key.created_at)
ago

View file

@ -1,7 +1,7 @@
- if @key.valid?
:plain
$("#new_key_dialog").dialog("close");
$("#keys-table").append("#{escape_javascript(render(:partial => 'show', :locals => {:key => @key} ))}");
$("#keys-table .data").append("#{escape_javascript(render(:partial => 'show', :locals => {:key => @key} ))}");
$("#no_ssh_key_defined").hide();
- else
:plain

View file

@ -1,16 +1,16 @@
%div#new-key-holder
%h2.icon
%span>
SSH Keys
%div#new-key-holder.right
= link_to "Add new", new_key_path, :remote => true, :class => "grey-button"
%br
%table.round-borders#keys-table
%tr
%th title
%th key
%th Actions
- @keys.each do |key|
= render(:partial => 'show', :locals => {:key => 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})
:javascript
$('.delete-key').live('ajax:success', function() {
$(this).closest('tr').fadeOut(); });
$(this).closest('.update-item').fadeOut(); });

View file

@ -0,0 +1,10 @@
.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