homeland-site 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/homeland/site/admin/site_nodes/_form.html.erb +17 -14
- data/app/views/homeland/site/admin/sites/_form.html.erb +26 -16
- data/app/views/homeland/site/sites/_form.html.erb +29 -15
- data/app/views/homeland/site/sites/index.html.erb +7 -7
- data/lib/homeland/site/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2769bd3d8d3ddf59d835619916064544950a86a3
|
4
|
+
data.tar.gz: f542ebcf6c97c115be5b99ea7e64cc438ca928c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d086ad0526d8f45c36858bbd2c034b17d5c17165cc2c2e54a025f8d4f9c767a846d4ea30cfd609fb9eff3fff6dae5f8370c0fceff36153283eb7f526318af0e
|
7
|
+
data.tar.gz: c959f77c7241d0892fbb4038e6fddf27a26803704bf70dcd81c6325a4d87341e9ebdeb5c06e3555f50f023ae139b8f4c5424f7a3ca2d3fbc0c63800b54a1dba6
|
@@ -1,16 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%= simple_form_for([:admin, @site_node]) do |f| %>
|
1
|
+
<%= form_for [:admin, @site_node] do |f| %>
|
4
2
|
<%= render "/shared/error_messages", target: @site_node %>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</
|
3
|
+
|
4
|
+
<div class="form-group">
|
5
|
+
<%= f.label :name %>
|
6
|
+
<%= f.text_field :name, class: "form-control" %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="form-group">
|
10
|
+
<%= f.label :sort %>
|
11
|
+
<%= f.text_field :sort, class: "form-control" %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-actions">
|
15
|
+
<%= f.submit '保存', class: "btn btn-primary", 'data-disable-with' => '保存中...' %>
|
16
|
+
<%= link_to '取消', admin_site_nodes_path, class: "btn btn-outline-primary" %>
|
17
|
+
</div>
|
15
18
|
<% end %>
|
16
|
-
|
19
|
+
|
@@ -1,18 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%= simple_form_for([:admin,@site]) do |f| %>
|
1
|
+
<%= form_for [:admin, @site] do |f| %>
|
4
2
|
<%= render "/shared/error_messages", target: @site %>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
3
|
+
|
4
|
+
<div class="form-group">
|
5
|
+
<%= f.label :name %>
|
6
|
+
<%= f.text_field :name, class: "form-control" %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="form-group">
|
10
|
+
<%= f.label :url %>
|
11
|
+
<%= f.url_field :url, class: "form-control" %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-group">
|
15
|
+
<%= f.label :url %>
|
16
|
+
<%= f.select :site_node_id, SiteNode.all.collect { |t| [t.name, t.id] }, { include_blank: false }, { class: "form-control" } %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="form-group">
|
20
|
+
<%= f.label :desc %>
|
21
|
+
<%= f.text_area :desc, class: "form-control", rows: 3 %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="form-actions">
|
25
|
+
<%= f.submit '保存', class: "btn btn-primary", 'data-disable-with' => '保存中...' %>
|
26
|
+
<%= link_to '取消', admin_sites_path, class: "btn btn-outline-primary" %>
|
27
|
+
</div>
|
17
28
|
<% end %>
|
18
|
-
</div>
|
@@ -1,19 +1,33 @@
|
|
1
|
-
<div id="site" class="
|
2
|
-
<div class="
|
3
|
-
<div class="
|
4
|
-
<%=
|
1
|
+
<div id="site" class="card">
|
2
|
+
<div class="card-header">提交酷站</div>
|
3
|
+
<div class="card-body">
|
4
|
+
<%= form_for @site do |f| %>
|
5
5
|
<%= render "/shared/error_messages", target: @site %>
|
6
|
-
<%= f.input :site_node_id, collection: SiteNode.all.collect { |t| [t.name, t.id] }, include_blank: false %>
|
7
6
|
|
8
|
-
|
9
|
-
<%= f.
|
10
|
-
<%= f.
|
7
|
+
<div class="form-group">
|
8
|
+
<%= f.label :site_node_id %>
|
9
|
+
<%= f.select :site_node_id, SiteNode.all.collect { |t| [t.name, t.id] }, { include_blank: false }, class: "form-control" %>
|
10
|
+
</div>
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
<div class="form-group">
|
13
|
+
<%= f.label :name %>
|
14
|
+
<%= f.text_field :name, class: "form-control" %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="form-group">
|
18
|
+
<%= f.label :url %>
|
19
|
+
<%= f.url_field :url, placeholder: "http://", class: "form-control" %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="form-group">
|
23
|
+
<%= f.label :desc %>
|
24
|
+
<%= f.text_area :desc, rows: 3, class: "form-control" %>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class="form-actions">
|
28
|
+
<%= f.submit '提交', class: "btn btn-primary", 'data-disable-with' => '提交中...' %>
|
29
|
+
<%= link_to '取消', sites_path, class: "btn btn-outline-primary" %>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
32
|
+
</div>
|
19
33
|
</div>
|
@@ -2,21 +2,21 @@
|
|
2
2
|
|
3
3
|
<div id="site_nodes">
|
4
4
|
<% if can? :create, ::Site %>
|
5
|
-
<div class="
|
6
|
-
<div class="
|
5
|
+
<div class="card">
|
6
|
+
<div class="card-body">
|
7
7
|
<%= raw Setting.site_index_html %>
|
8
|
-
<%= link_to('
|
8
|
+
<%= link_to('提交酷站', new_site_path, class: "btn btn-primary")%>
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
<% end %>
|
12
12
|
|
13
13
|
<% cache(["plugin/sites", t: CacheVersion.sites_updated_at, d: Date.today]) do %>
|
14
14
|
<% @site_nodes.each do |node| %>
|
15
|
-
<div class="
|
16
|
-
<div class="
|
17
|
-
<div class="
|
15
|
+
<div class="card">
|
16
|
+
<div class="card-header"><%= node.name %></div>
|
17
|
+
<div class="card-body row">
|
18
18
|
<% node.sites.each do |item| %>
|
19
|
-
<div class="col-md-
|
19
|
+
<div class="col-md-3 site">
|
20
20
|
<%= image_tag(item.favicon_url, class: "favicon", style: "width: 16px; height: 16px;")%>
|
21
21
|
<%= link_to item.name, item.url, target: "_blank", rel: "twipsy", title: item.desc %>
|
22
22
|
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homeland-site
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
87
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.
|
88
|
+
rubygems_version: 2.5.2
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: Site plugin for Homeland
|