foreman_datacenter 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/foreman_datacenter/comments/_comments.html.erb +22 -16
- data/app/views/foreman_datacenter/comments/_item.html.erb +9 -9
- data/app/views/foreman_datacenter/devices/show.html.erb +1 -24
- data/db/migrate/20171004221349_add_user_id_to_comments.rb +5 -0
- data/lib/foreman_datacenter/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a51927a6d6c5ab0213cf5133fbf9e5128ab0d9f6
|
|
4
|
+
data.tar.gz: 3f176391dd82707b426739969ac176b61fd5b61a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 47fa4ed6fcd7cdefa808b58db7af49ebb20c8cd0743a794afbbcf7463d2417b92db3b81f4419b32d4721f941fc7ff1e5157d246f233420562d12b3976dc62ade
|
|
7
|
+
data.tar.gz: 27c6ba3746379282ef251e985a72df79d1a010471c0a195872378209763aba4977fafddd509a9d44b72cf8d5c6d6738b421b1703b781dba99aeccf38d0630da9
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
<% stylesheet 'foreman_datacenter/comments' %>
|
|
2
2
|
|
|
3
3
|
<table class="table table-hover panel-body table-striped">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
<% if comments == [] %>
|
|
5
|
+
<div class="col-md-2">
|
|
6
|
+
<small>No comments yet...</small>
|
|
7
|
+
</div>
|
|
8
|
+
<% else %>
|
|
9
|
+
<tbody>
|
|
10
|
+
<% comments.roots.each do |c| %>
|
|
11
|
+
<tr>
|
|
12
|
+
<td>
|
|
13
|
+
<ul class="none-list" style="padding-left:5px;margin-top:5px;">
|
|
14
|
+
<li>
|
|
15
|
+
<%= render 'foreman_datacenter/comments/item', comment: c, commentable_data: commentable_data %>
|
|
16
|
+
</li>
|
|
17
|
+
<% if c.root.descendants != [] %>
|
|
18
|
+
<%= render 'foreman_datacenter/comments/children', c: c.root.descendants.arrange, commentable_data: commentable_data %>
|
|
19
|
+
<% end %>
|
|
20
|
+
</ul>
|
|
21
|
+
</td>
|
|
22
|
+
</tr>
|
|
23
|
+
<% end %>
|
|
24
|
+
</tbody>
|
|
25
|
+
<% end %>
|
|
20
26
|
</table>
|
|
21
27
|
|
|
22
28
|
<%= render 'foreman_datacenter/comments/form'%>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<strong>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<strong id="comment-<%= comment.id %>">
|
|
2
|
+
<small class="text-left pull-left">
|
|
3
|
+
Posted by ... <%#= "#{@user.firstname} #{@user.lastname}" %> at <%= comment.updated_at %>
|
|
4
|
+
</small>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
<small class="text-right pull-right">
|
|
7
|
+
<%= link_to "##{comment.id}", "#comment-#{comment.id}" %>
|
|
8
|
+
</small>
|
|
9
9
|
</strong>
|
|
10
10
|
<br/>
|
|
11
11
|
<div class="text-left pull-left">
|
|
12
|
-
|
|
12
|
+
<%= comment.content %>
|
|
13
13
|
<br/>
|
|
14
14
|
<small>
|
|
15
15
|
<%= link_to "Reply", new_comment_path(parent_id: comment.id, resource: commentable_data[:resource], resource_id: commentable_data[:id]) %>
|
|
16
16
|
|
|
17
17
|
<%= link_to "Edit", "/datacenter/comments/#{comment.id}/edit" %>
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
<%= link_to "Delete", "/datacenter/#{commentable_data[:resource]}/#{commentable_data[:id]}/comments/#{comment.id}", method: :delete, data: {confirm: "Are you sure?"} %>
|
|
20
20
|
</small>
|
|
21
21
|
</div>
|
|
22
22
|
<br/>
|
|
@@ -386,30 +386,7 @@
|
|
|
386
386
|
<!-- Comments -->
|
|
387
387
|
<div class="panel panel-default">
|
|
388
388
|
<div class="panel-heading"><strong>Comments</strong></div>
|
|
389
|
-
|
|
390
|
-
<tbody>
|
|
391
|
-
<% @device.comments.each do |c| %>
|
|
392
|
-
<tr>
|
|
393
|
-
<td>
|
|
394
|
-
<!-- <div id="comment-<%#= c.id %>"></div> -->
|
|
395
|
-
<div class="text-left pull-left" id="comment-<%= c.id %>">
|
|
396
|
-
<strong><small>Updated by ... <%#= "#{@user.firstname} #{@user.lastname}" %> at <%= c.updated_at %></small></strong>
|
|
397
|
-
<br/>
|
|
398
|
-
<%= c.content %>
|
|
399
|
-
</div>
|
|
400
|
-
<div class="text-right pull-right">
|
|
401
|
-
<%= link_to "##{c.id}", "#comment-#{c.id}" %>
|
|
402
|
-
<%= link_to "Delete", "/datacenter/#{@resource}/#{@id}/comments/#{c.id}", method: :delete, data: {confirm: "Are you sure?"} %>
|
|
403
|
-
<%= link_to "Edit", "/datacenter/comments/#{c.id}/edit" %>
|
|
404
|
-
</div>
|
|
405
|
-
<br/>
|
|
406
|
-
</td>
|
|
407
|
-
</tr>
|
|
408
|
-
<% end %>
|
|
409
|
-
</tbody>
|
|
410
|
-
</table>
|
|
411
|
-
<%= render 'foreman_datacenter/comments/form' %>
|
|
389
|
+
<%= render 'foreman_datacenter/comments/comments', comments: @device.comments, commentable_data: @commentable_data %>
|
|
412
390
|
</div>
|
|
413
|
-
|
|
414
391
|
</div>
|
|
415
392
|
</div>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_datacenter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Ivanov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: deface
|
|
@@ -331,6 +331,7 @@ files:
|
|
|
331
331
|
- db/migrate/20170924194247_rename_device_comments_column.rb
|
|
332
332
|
- db/migrate/20170929101032_add_parent_id_to_comments.rb
|
|
333
333
|
- db/migrate/20171001130802_fix_parent_id_column_in_comments.rb
|
|
334
|
+
- db/migrate/20171004221349_add_user_id_to_comments.rb
|
|
334
335
|
- lib/foreman_datacenter.rb
|
|
335
336
|
- lib/foreman_datacenter/engine.rb
|
|
336
337
|
- lib/foreman_datacenter/version.rb
|