external link
This commit is contained in:
parent
29baca787a
commit
1cc5c635f1
11
app/views/admin/external_links/_external_link.html.haml
Normal file
11
app/views/admin/external_links/_external_link.html.haml
Normal file
@ -0,0 +1,11 @@
|
||||
%tr#external_link_row.external_link_row.row{:id => external_link.id}
|
||||
%td
|
||||
= link_to i(:check_alt, :gray_light,12), "#",:onclick => "manager_send_cible("+external_link.id.to_s+", 'ExternalLink', '#{escape_javascript(external_link.cible_name)}');return false;"
|
||||
=external_link.url
|
||||
|
||||
|
||||
%td.actions
|
||||
= link_to i(:trash_stroke, :blue), [:admin, external_link], :confirm => 'Voulez-vous vraiment supprimer ce lien externe ?', :method => :delete, :remote => true
|
||||
|
||||
= link_to i(:pen_alt_fill, :blue), edit_admin_external_link_path(external_link), :remote => true
|
||||
|
14
app/views/admin/external_links/_form.html.haml
Normal file
14
app/views/admin/external_links/_form.html.haml
Normal file
@ -0,0 +1,14 @@
|
||||
= semantic_form_for [:admin, @external_link], :remote => true do |form|
|
||||
|
||||
= form.inputs do
|
||||
|
||||
= form.input :url, :label => "Url :"
|
||||
|
||||
|
||||
.actions
|
||||
%button{:type => "submit"} Sauvegarder
|
||||
|
||||
|
||||
|
||||
|
||||
|
10
app/views/admin/external_links/cible.html.haml
Normal file
10
app/views/admin/external_links/cible.html.haml
Normal file
@ -0,0 +1,10 @@
|
||||
= link_to 'Ajouter un lien', new_admin_external_link_path, :remote => true, :class => "button"
|
||||
|
||||
|
||||
%table.normal_table
|
||||
|
||||
|
||||
%tbody#external_link_rows.rows
|
||||
|
||||
=render @external_links
|
||||
|
2
app/views/admin/external_links/create.js.erb
Normal file
2
app/views/admin/external_links/create.js.erb
Normal file
@ -0,0 +1,2 @@
|
||||
close_pane_hover();
|
||||
$('#external_link_rows').prepend("<%= escape_javascript(render(@external_link))%>");
|
1
app/views/admin/external_links/destroy.js.erb
Normal file
1
app/views/admin/external_links/destroy.js.erb
Normal file
@ -0,0 +1 @@
|
||||
$('#external_link_row_<%= @external_link.id %>').remove();
|
6
app/views/admin/external_links/edit.html.haml
Normal file
6
app/views/admin/external_links/edit.html.haml
Normal file
@ -0,0 +1,6 @@
|
||||
.grid_12
|
||||
%h1 Modifier un administrateur
|
||||
|
||||
|
||||
=render :partial => "form"
|
||||
|
1
app/views/admin/external_links/edit.js.erb
Normal file
1
app/views/admin/external_links/edit.js.erb
Normal file
@ -0,0 +1 @@
|
||||
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>", 500, 500, 3000);
|
2
app/views/admin/external_links/index.js.erb
Normal file
2
app/views/admin/external_links/index.js.erb
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
$('#Admin_index_block').replaceWith("<%= escape_javascript(render(:partial => "index_block")) %>");
|
1
app/views/admin/external_links/new.js.erb
Normal file
1
app/views/admin/external_links/new.js.erb
Normal file
@ -0,0 +1 @@
|
||||
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>", 500, 500, 3000);
|
31
app/views/admin/external_links/show.html.haml
Normal file
31
app/views/admin/external_links/show.html.haml
Normal file
@ -0,0 +1,31 @@
|
||||
.header
|
||||
%h1 Détails de l'utilisateur
|
||||
.back
|
||||
= link_to "Retour",admin_users_path
|
||||
.links
|
||||
= link_to "Modifier", edit_admin_user_path(@user), :class => "lien"
|
||||
|
||||
.shadow_box{:style => "padding:10px;"}
|
||||
%p
|
||||
<b>Login:</b>
|
||||
=h @user.login
|
||||
|
||||
%p
|
||||
|
||||
<b>Email:</b>
|
||||
=mail_to @user.email
|
||||
|
||||
|
||||
|
||||
.shadow_box.padding
|
||||
%h2 Logs
|
||||
%table.admin_table
|
||||
-for log in @user.user_logs.find(:all, :order => "created_at DESC")
|
||||
%tr
|
||||
%td=l log.created_at
|
||||
%td=h log.message
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
app/views/admin/external_links/update.js.erb
Normal file
2
app/views/admin/external_links/update.js.erb
Normal file
@ -0,0 +1,2 @@
|
||||
close_pane_hover();
|
||||
$('#external_link_row_<%= @external_link.id %>').replaceWith("<%= escape_javascript(render(@external_link))%>");
|
11
test/fixtures/external_links.yml
vendored
Normal file
11
test/fixtures/external_links.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
|
||||
|
||||
one:
|
||||
title: MyString
|
||||
description: MyText
|
||||
url: MyString
|
||||
|
||||
two:
|
||||
title: MyString
|
||||
description: MyText
|
||||
url: MyString
|
7
test/unit/external_link_test.rb
Normal file
7
test/unit/external_link_test.rb
Normal file
@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class ExternalLinkTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user