homeland-note 0.1.3 → 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/assets/stylesheets/homeland/note/application.scss +1 -1
- data/app/views/homeland/note/notes/_form.html.erb +23 -22
- data/app/views/homeland/note/notes/_sidebar.html.erb +6 -6
- data/app/views/homeland/note/notes/edit.html.erb +2 -2
- data/app/views/homeland/note/notes/index.html.erb +5 -5
- data/app/views/homeland/note/notes/new.html.erb +2 -2
- data/app/views/homeland/note/notes/show.html.erb +19 -21
- data/lib/homeland/note/version.rb +2 -2
- 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: 13fbe8a348a082c445d93eb308b2ea965a34c4ad
|
4
|
+
data.tar.gz: c05dd0e6b9e3dab1dc79a023454c272bb814fb77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c667c7c35ed1b4cce53deda11442c4879b28ca2e6c4369b983cc3ff145aa16924e8c24d55ab920fa38c4e44a6582fadbb504b44d6aacd68de3e1a48d8bcbcf43
|
7
|
+
data.tar.gz: 322d5f44452c82d0c41299e73bcf9b4400617af6239e871e6bddc7d950d8f33d97762cfb070552e3d014a048e7c5e652d3a7aea0071a96f623aa4e01ff7dc661
|
@@ -1,30 +1,31 @@
|
|
1
|
-
<%=
|
2
|
-
|
1
|
+
<%= form_for @note do |f| %>
|
2
|
+
<%= render "shared/error_messages", target: @note %>
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
<div class="edit-tools">
|
5
|
+
<%= render "/shared/editor_toolbar" %>
|
6
|
+
</div>
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
<div class="form-group">
|
9
|
+
<%= f.text_area :body, rows: 20, class: 'form-control topic-editor' %>
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
<p class="help-block">
|
12
|
+
请用 <a href="/markdown" target="_blank">Markdown</a> 格式编写。
|
13
|
+
</p>
|
14
|
+
</div>
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
<div class="form-group form-check">
|
17
|
+
<%= f.check_box :publish, class: "form-check-input" %>
|
18
|
+
<label class="form-check-label" for="note_publish"> 公开 <span class="text-danger"><i class="fa fa-warning"></i> 除非你选择公开,否则此 Note 的所有内容将是保密的!<span></label>
|
19
|
+
</div>
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
</div>
|
21
|
+
<div class="form-actions">
|
22
|
+
<div class="row">
|
23
|
+
<div class="col-sm-3">
|
24
|
+
<%= f.submit "保存", class: "btn btn-primary btn-block", 'data-disable-with' => "保存中..." %>
|
25
|
+
</div>
|
26
|
+
<div class="col-sm-2">
|
27
|
+
<%= link_to "取消", notes_path, class: "btn btn-default btn-block" %>
|
28
28
|
</div>
|
29
29
|
</div>
|
30
|
+
</div>
|
30
31
|
<% end %>
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<div class="sidebar col-md-3">
|
2
|
-
<div class="
|
3
|
-
<div class="
|
2
|
+
<div class="card">
|
3
|
+
<div class="card-body">
|
4
4
|
<p><a href="<%= new_note_path %>" class="btn btn-success btn-block">新建 Note</a></p>
|
5
5
|
<div>
|
6
6
|
记事本用于保存个人私密的记事信息,除非你选择公开,否则其他人无法访问。
|
7
7
|
</div>
|
8
8
|
</div>
|
9
|
-
<div class="
|
9
|
+
<div class="card-footer"><a href="<%= notes_path %>">查看我的 <%= current_user_notes.count %> 条 Note...</a></div>
|
10
10
|
</div>
|
11
11
|
|
12
12
|
<% if @recent_notes.present? %>
|
13
|
-
<div class="
|
14
|
-
<div class="
|
15
|
-
<ul class="list-group">
|
13
|
+
<div class="card">
|
14
|
+
<div class="card-header">我最近创建的 Note</div>
|
15
|
+
<ul class="list-group list-group-flush">
|
16
16
|
<% @recent_notes.each do |note| %>
|
17
17
|
<li class="list-group-item">
|
18
18
|
<%= link_to note.display_title, note %>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<% title_tag t('plugin.note') %>
|
2
2
|
<div class="row">
|
3
3
|
<div class="col-md-9">
|
4
|
-
<div id="notes" class="
|
5
|
-
<div class="
|
4
|
+
<div id="notes" class="card">
|
5
|
+
<div class="card-header">
|
6
6
|
<%= t('plugin.note') %>
|
7
7
|
<span class="total pull-right">
|
8
8
|
已有 <%= current_user_notes.count %> 条 Note
|
9
9
|
</span>
|
10
10
|
</div>
|
11
11
|
|
12
|
-
<div class="
|
12
|
+
<div class="card-body">
|
13
13
|
<% if @notes.blank? %>
|
14
14
|
<div style="text-align:center; padding:60px 0;">你还没有创建过一个文件。</div>
|
15
15
|
<% else %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<div class="media-heading">
|
20
20
|
<%= link_to note.display_title, note %>
|
21
21
|
<% if note.publish %>
|
22
|
-
<span class="label warning"><i class="fa fa-share-alt"></i> 公开</span>
|
22
|
+
<span class="label label-text-warning"><i class="fa fa-share-alt"></i> 公开</span>
|
23
23
|
<% end %>
|
24
24
|
<span class="opts pull-right">
|
25
25
|
<a href="<%= edit_note_path(note.id) %>"><i class="fa fa-pencil"></i></a>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<% end %>
|
35
35
|
</div>
|
36
36
|
|
37
|
-
<div class="
|
37
|
+
<div class="card-footer clearfix">
|
38
38
|
<%= paginate @notes %>
|
39
39
|
</div>
|
40
40
|
</div>
|
@@ -2,29 +2,21 @@
|
|
2
2
|
|
3
3
|
<div class="row">
|
4
4
|
<div class="col-sm-9">
|
5
|
-
<div id="notes" class="
|
6
|
-
<div class="
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
</span>
|
18
|
-
<% end %>
|
19
|
-
</div>
|
20
|
-
<% if @note.publish %>
|
21
|
-
<div class="links">
|
22
|
-
<label>页面链接</label>
|
23
|
-
<%= note_url(@note) %>
|
24
|
-
</div>
|
5
|
+
<div id="notes" class="card">
|
6
|
+
<div class="card-header info clearfix">
|
7
|
+
共 <%= @note.word_count %> 个字符
|
8
|
+
• <%= user_name_tag(@note.user) if !owner? @note %>
|
9
|
+
<%= l @note.created_at, format: :long %>
|
10
|
+
• <%= @note.hits %> 次阅读
|
11
|
+
• <%= @note.changes_count %> 次修改
|
12
|
+
<% if owner? @note %>
|
13
|
+
<span class="opts pull-right">
|
14
|
+
<%= link_to icon_tag("pencil"), edit_note_path(@note), title: "编辑" %>
|
15
|
+
<%= link_to icon_tag("trash"), note_path(@note), 'data-confirm' => "确定要删除么?", method: :delete %>
|
16
|
+
</span>
|
25
17
|
<% end %>
|
26
18
|
</div>
|
27
|
-
<div class="
|
19
|
+
<div class="card-body">
|
28
20
|
<% if !@note.publish %>
|
29
21
|
<i class="fa fa-lock text-success pull-right" title="此内容保密"></i>
|
30
22
|
<% end %>
|
@@ -32,6 +24,12 @@
|
|
32
24
|
<%= markdown(@note.body) %>
|
33
25
|
</div>
|
34
26
|
</div>
|
27
|
+
<% if @note.publish %>
|
28
|
+
<div class="card-footer links">
|
29
|
+
<label>页面链接</label>
|
30
|
+
<%= note_url(@note) %>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
35
33
|
</div>
|
36
34
|
</div>
|
37
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homeland-note
|
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
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.5.2
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Note plugin for Homeland
|