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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4229a62bdf81a90ee8bd7a69f30134c789621c81
4
- data.tar.gz: 6f4619c31761fedd41d046a008cd1c1ac24c37a3
3
+ metadata.gz: 2769bd3d8d3ddf59d835619916064544950a86a3
4
+ data.tar.gz: f542ebcf6c97c115be5b99ea7e64cc438ca928c4
5
5
  SHA512:
6
- metadata.gz: '09621dd5abb93a6fbad53eabe65a31f85d6a318327caa50ae12ed30c662e26f730daccbec0f75ffad8afab66d58315cf548c047d4ec00ebca8cfc97f8d5318a3'
7
- data.tar.gz: 972938c6deb16213f011935aa9c6bb246da38118903b579e809a6e9a509e660b9cba61959cc4fd20c72a8aa15bc3c4e3e2f693dc1f11ca22fe03df7e7f56ecde
6
+ metadata.gz: 3d086ad0526d8f45c36858bbd2c034b17d5c17165cc2c2e54a025f8d4f9c767a846d4ea30cfd609fb9eff3fff6dae5f8370c0fceff36153283eb7f526318af0e
7
+ data.tar.gz: c959f77c7241d0892fbb4038e6fddf27a26803704bf70dcd81c6325a4d87341e9ebdeb5c06e3555f50f023ae139b8f4c5424f7a3ca2d3fbc0c63800b54a1dba6
@@ -1,16 +1,19 @@
1
- <div id="admin_site_node" class="form">
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
- <fieldset>
6
- <legend>编辑</legend>
7
- <%= f.input :name %>
8
- <%= f.input :sort %>
9
- <div class="form-actions">
10
- <%= f.submit '保存', class: "btn btn-primary", 'data-disable-with' => '保存中...' %>
11
- or
12
- <%= link_to '取消', admin_site_nodes_path %>
13
- </div>
14
- </fieldset>
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
- </div>
19
+
@@ -1,18 +1,28 @@
1
- <div id="admin_site" class="form">
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
- <fieldset>
6
- <legend><%= t("common.edit") %></legend>
7
- <%= f.input :name %>
8
- <%= f.input :url, input_html: { class: "xxlarge" }, placeholder: "http://" %>
9
- <%= f.input :desc, as: :text, input_html: { class: "xxlarge", rows: "3" } %>
10
- <%= f.input :site_node_id, collection: SiteNode.all.collect { |t| [t.name, t.id] }, include_blank: false %>
11
- <div class="form-actions">
12
- <%= f.submit '保存', class: "btn btn-primary", 'data-disable-with' => '保存中...' %>
13
- or
14
- <%= link_to '取消', admin_sites_path %>
15
- </div>
16
- </fieldset>
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="panel panel-default">
2
- <div class="panel-heading">提交酷站</div>
3
- <div class="panel-body">
4
- <%= simple_form_for(@site) do |f| %>
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
- <%= f.input :name %>
9
- <%= f.input :url, input_html: { class: "xxlarge" }, placeholder: "http://" %>
10
- <%= f.input :desc, as: :text, input_html: { class: "xxlarge", rows: "3" } %>
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
- <div class="form-group">
13
- <%= f.submit '提交', class: "btn btn-primary", 'data-disable-with' => '提交中...' %>
14
- or
15
- <%= link_to '取消', sites_path %>
16
- </div>
17
- <% end %>
18
- </div>
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="panel panel-default">
6
- <div class="panel-body">
5
+ <div class="card">
6
+ <div class="card-body">
7
7
  <%= raw Setting.site_index_html %>
8
- <%= link_to('创建', new_site_path, class: "btn btn-success")%>
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="panel panel-default">
16
- <div class="panel-heading"><%= node.name %></div>
17
- <div class="panel-body row">
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-2 site">
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>
@@ -1,6 +1,6 @@
1
1
  module Homeland
2
2
  module Site
3
- VERSION = '0.1.2'
3
+ VERSION = '0.2.0'
4
4
  NAME = 'site'
5
5
  DESCRIPTION = 'Site for Homeland.'
6
6
  end
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.1.2
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: 2017-03-21 00:00:00.000000000 Z
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.6.11
88
+ rubygems_version: 2.5.2
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Site plugin for Homeland