質問編集履歴

1

ソース追加

2016/03/14 06:12

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -2,4 +2,82 @@
2
2
 
3
3
 
4
4
 
5
+ ```rails
6
+
7
+ .prototype
8
+
9
+ .col-sm-4.col-md-3.proto-content
10
+
11
+ .thumbnail
12
+
13
+ - if current_user.id == prototype.user_id
14
+
15
+ .user_operation
16
+
17
+ %ul.operation_list
18
+
19
+ %li
20
+
21
+ = link_to 'edit', edit_prototype_path(prototype)
22
+
23
+ %li
24
+
25
+ = link_to 'delete', prototype_path(prototype), method: :delete
26
+
27
+ = link_to image_tag(prototype.thumbnails.first.thumbnail.url), prototype_path(prototype)
28
+
29
+ .caption
30
+
31
+ %h3= prototype.title
32
+
33
+ .proto-meta
34
+
35
+ .proto-user
36
+
37
+ = link_to prototype.user.name, user_path(prototype.user)
38
+
39
+ .proto-posted
40
+
41
+ = prototype.created_at.strftime('%b %d')
42
+
43
+ %ul.proto-tag-list.list-inline
44
+
45
+ - prototype.tags.each do |tag|
46
+
47
+ %li
48
+
49
+ .btn.btn-default= link_to tag.name, tag_path(tag)
50
+
51
+
52
+
53
+ ```
54
+
55
+
56
+
57
+ ```js
58
+
59
+ $(document).ready(function(){
60
+
61
+ $('.thumbnail').hover(
62
+
63
+ function(){
64
+
65
+ $(this).find('.operation_list').css('display', 'block');
66
+
67
+ },
68
+
69
+ function(){
70
+
71
+ $('.operation_list').css('display', 'none');
72
+
73
+ }
74
+
75
+ );
76
+
77
+ });
78
+
79
+ ```
80
+
81
+
82
+
5
83
  どなたか対応策知っておられる方お願いいたします。