tawork 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b54659547c9c86ffebd0dd4326e9e1b7f8294edf
4
- data.tar.gz: afd439e358cf52332b2d4f80cc16d4292d07de40
3
+ metadata.gz: b76d76b70dea6832ab2fe34c3b8e2130e563062d
4
+ data.tar.gz: 2a1a451002c43af516571cfcc1b24ba009f72347
5
5
  SHA512:
6
- metadata.gz: fe8ea75b18ceec45c7a28f3f85fd198c9950eb9b3146059f4b2d3f1c6a3db2270b6b0102d33cfe528370c12ce64c609b20041270c22c700b59343c5da7069439
7
- data.tar.gz: 47c9e024a87b2ff33bc3f5c22137c2e1412b1704aba3f823019eb68fc49530fd35f943b627c5806fa9f809bf5819f3b9fb55d9aea257af3a7561973e6b307b6b
6
+ metadata.gz: 7a85e04f90885a9812921f19e3f81561a4f9a093c024d3eb331b7575e70d1f2116c29c077d59ae0054c1bdbc34a789db709e7e7937bee6e888bce7c63671668c
7
+ data.tar.gz: e571470cfbe80cc9da896070e24a9f62e8d8ea11d451e02c78e931100074f51b5dc7e3dc1636283d02cef030d571d5e6f8729cd23b75e2e640bc71c538861102
data/Gemfile.lock CHANGED
@@ -80,6 +80,8 @@ GEM
80
80
  erubis (2.7.0)
81
81
  eventmachine (1.0.3)
82
82
  execjs (2.0.2)
83
+ font-awesome-rails (4.0.3.0)
84
+ railties (>= 3.2, < 5.0)
83
85
  foreman (0.61.0)
84
86
  thor (>= 0.13.6)
85
87
  github-markdown (0.6.3)
@@ -171,7 +173,6 @@ GEM
171
173
  railties (= 4.0.2)
172
174
  sprockets-rails (~> 2.0.0)
173
175
  rails-assets-backbone (1.1.0)
174
- rails-assets-components-font-awesome (4.0.3)
175
176
  rails-assets-highlightjs (7.5.0)
176
177
  rails-assets-jquery (2.0.3)
177
178
  rails-assets-jquery-autosize (1.18.2)
@@ -262,6 +263,7 @@ DEPENDENCIES
262
263
  coffee-rails (~> 4.0.0)
263
264
  devise
264
265
  diffy
266
+ font-awesome-rails
265
267
  foreman
266
268
  github-markdown
267
269
  gollum-lib
@@ -278,7 +280,6 @@ DEPENDENCIES
278
280
  public_activity
279
281
  rack-mini-profiler
280
282
  rails-assets-backbone
281
- rails-assets-components-font-awesome
282
283
  rails-assets-highlightjs
283
284
  rails-assets-jquery-autosize
284
285
  rails-assets-jquery-ui
@@ -25,7 +25,7 @@
25
25
  //= require tinymce-jquery
26
26
  //= require tinymce/mention/plugin
27
27
  //= require jquery-autosize
28
- //= require jquery.timeago
28
+ //= require rails-timeago
29
29
  //= require underscore
30
30
  //= require backbone
31
31
  //= require backbone/tawork
@@ -95,11 +95,6 @@ li.mjs-nestedSortable-expanded
95
95
  // &:hover
96
96
  // display: inline
97
97
 
98
- .ticket-description
99
-
100
- table
101
- @extend .table
102
-
103
98
  .ticket-state
104
99
  position: relative
105
100
 
@@ -206,3 +201,21 @@ li.mjs-nestedSortable-expanded
206
201
  color: #fff
207
202
  background-color: #2986b9
208
203
  text-decoration: none
204
+
205
+ .wiki-title
206
+ font-size: 54px
207
+ border-bottom: 1px dashed lightgray
208
+ margin-bottom: 5px
209
+
210
+ .content-description
211
+ table
212
+ @extend .table
213
+
214
+ h1
215
+ border-bottom: 1px solid lightgray
216
+ padding-bottom: .25em
217
+
218
+ .last-updated
219
+ .user, .time
220
+ display: inline
221
+
@@ -22,6 +22,9 @@ class Wiki::PagesController < ApplicationController
22
22
 
23
23
  def show
24
24
  @subtree = @page.subtree.group_by(&:parent_id)
25
+ @last_updated = @page.activities.
26
+ where(key: 'page.update_details').
27
+ order("created_at desc").first
25
28
  end
26
29
 
27
30
  def history
@@ -42,7 +45,7 @@ class Wiki::PagesController < ApplicationController
42
45
  end
43
46
  if @page.update_attributes(update_params)
44
47
  @page.update_to_gollum(current_user)
45
- @page.create_activity key: "page.update_details", owner: current_user
48
+ @last_updated = @page.create_activity key: "page.update_details", owner: current_user
46
49
  end
47
50
  end
48
51
 
@@ -1,7 +1,9 @@
1
- %h1#wiki-title.wiki-title= @page.title
1
+ .page-article{class: "page_#{@page.id}"}
2
+ %h1#wiki-title.wiki-title= @page.title
3
+ = render 'last_updated'
2
4
 
3
- #wiki-content.wiki-content.ticket-description
4
- ~raw @page.body
5
+ #wiki-content.wiki-content.content-description
6
+ ~raw @page.body
5
7
 
6
8
  - if params[:markdown].present?
7
9
  %textarea#markdown_body{rows: 10, cols: 60}
@@ -0,0 +1,6 @@
1
+ .last-updated.pull-right.meta
2
+ - if @last_updated
3
+ %span Last updated by
4
+ .user= @last_updated.owner.display_name
5
+ \-
6
+ .time= timeago_tag @last_updated.created_at, date_only: false
@@ -0,0 +1,7 @@
1
+ <% if @page.errors.any? %>
2
+ alert <%=raw @ticket.errors.to_a.to_json %>
3
+ <% else %>
4
+ $(".page_<%= @page.id %> .last-updated")
5
+ .replaceWith('<%=j render 'last_updated' %>')
6
+ $(".page_<%= @page.id %> .last-updated time").timeago()
7
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module Tawork
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tawork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adnan Ali
@@ -140,6 +140,7 @@ files:
140
140
  - app/views/wiki/pages/_breadcrumb.html.haml
141
141
  - app/views/wiki/pages/_child_menu.html.haml
142
142
  - app/views/wiki/pages/_display.html.haml
143
+ - app/views/wiki/pages/_last_updated.html.haml
143
144
  - app/views/wiki/pages/_page_header.html.haml
144
145
  - app/views/wiki/pages/_subpages_dropdown.html.haml
145
146
  - app/views/wiki/pages/_subtree.html.haml
@@ -152,7 +153,7 @@ files:
152
153
  - app/views/wiki/pages/index.html.haml
153
154
  - app/views/wiki/pages/new.html.haml
154
155
  - app/views/wiki/pages/show.html.haml
155
- - app/views/wiki/pages/update.html.haml
156
+ - app/views/wiki/pages/update.js.coffee
156
157
  - app/views/wiki/spaces/_page_list_item.html.haml
157
158
  - app/views/wiki/spaces/_space_list.html.haml
158
159
  - app/views/wiki/spaces/new.html.haml
@@ -1,2 +0,0 @@
1
- %h1 Wiki::Pages#update
2
- %p Find me in app/views/wiki/pages/update.html.haml