appdoc 0.1.0 → 0.1.1

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.
@@ -1,4 +1,5 @@
1
- .search.summary!=page_entries_info(@documents, :entry_name=>'document')
1
+ -if respond_to? :page_entries_info
2
+ .search.summary!=page_entries_info(@documents, :entry_name=>'document')
2
3
 
3
4
  %table
4
5
  %tr
@@ -1,21 +1,3 @@
1
- -content_for(:head) do
2
- =javascript_include_tag('jquery-ui')
3
- =javascript_include_tag('SmartTextBox')
4
- =stylesheet_link_tag('jquery/smart_text_box/SmartTextBox')
5
- :javascript
6
- $(document).ready(function() {
7
- // Tagging
8
- $('#document_tag_list').smartTextBox({
9
- submitChars: [#{Appdoc.delimiter.to_json}],
10
- separator: ", ",
11
- autocompleteValues: #{Appdoc.autocompleteValues.to_json},
12
- minSearchLength: #{Appdoc.minSearchLength},
13
- placeholder: #{Appdoc.placeholder.to_json}
14
- });
15
- });
16
-
17
- =render('shared/wysiwyg')
18
-
19
1
  =form_for(@document) do |f|
20
2
  %dl
21
3
  %dt.name=f.label :name
@@ -24,7 +6,7 @@
24
6
  %dd.slug=f.text_field :slug
25
7
  %dt.tags=f.label :tag_list, 'Tags'
26
8
  %dd.tags
27
- =f.text_field :tag_list, :maxlength => "15"
9
+ =f.text_field :tag_list
28
10
  %span.help_text Lower case and separated by spaces
29
11
  %dt.content=f.label :content
30
12
  %dd.content=f.text_area :content
@@ -1,5 +1,11 @@
1
1
  -content_for(:aside) do
2
- -if permitted_to? :create, :documents
2
+ -if respond_to? :permitted_to?
3
+ -if permitted_to? :create, :documents
4
+ %h2 Actions
5
+ .box
6
+ %h3.add= link_to('New document', new_document_path)
7
+
8
+ -else
3
9
  %h2 Actions
4
10
  .box
5
- %h3.add!=link_to('New document', new_document_path)
11
+ %h3.add=link_to('New document', new_document_path)
@@ -10,3 +10,9 @@
10
10
  !=render('documents', :documents => @documents)
11
11
 
12
12
  !=render('index_aside')
13
+
14
+ -if respond_to? :permitted_to?
15
+ -if permitted_to? :create, :documents
16
+ =link_to('New document', new_document_path, :id=>'new_document_link')
17
+ -else
18
+ =link_to('New document', new_document_path, :id=>'new_document_link')
@@ -5,4 +5,14 @@
5
5
  %ul.tags
6
6
  -@document.tags.each do |tag|
7
7
  %li!=link_to(tag, {:controller=>'documents', :tag=>tag.to_s})
8
- !=action_links @document
8
+
9
+ -#!=action_links @document
10
+
11
+ -if respond_to? :permitted_to?
12
+ -if permitted_to? :edit, :documents
13
+ = link_to 'Edit', edit_document_path(@document)
14
+ -if permitted_to? :destroy, :documents
15
+ = link_to 'Destroy', @document, :confirm => 'Are you sure?', :method => :delete
16
+ -else
17
+ = link_to 'Edit', edit_document_path(@document)
18
+ = link_to 'Destroy', @document, :confirm => 'Are you sure?', :method => :delete
data/lib/appdoc.rb CHANGED
@@ -3,7 +3,6 @@ require "appdoc/version"
3
3
  module Appdoc
4
4
  require 'appdoc/engine' if defined?(Rails)
5
5
  require 'acts-as-taggable-on'
6
- require 'declarative_authorization'
7
6
  require 'haml'
8
7
  require 'kaminari'
9
8
  require 'meta_search'
@@ -1,3 +1,3 @@
1
1
  module Appdoc
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -23,9 +23,4 @@ class AppdocGenerator < Rails::Generators::Base
23
23
  template 'appdoc_config.rb', 'config/initializers/appdoc_config.rb'
24
24
  end
25
25
 
26
- def copy_related_files
27
- copy_file 'public/stylesheets/jquery/smart_text_box/SmartTextBox.css', 'public/stylesheets/jquery/smart_text_box/SmartTextBox.css'
28
- copy_file 'public/stylesheets/jquery/smart_text_box/imgs/close.gif', 'public/stylesheets/jquery/smart_text_box/imgs/close.gif'
29
- copy_file 'public/javascripts/SmartTextBox.js', 'public/javascripts/SmartTextBox.js'
30
- end
31
26
  end
@@ -1,4 +1,4 @@
1
- class CreateDocuments < ActiveRecord::Migration
1
+ class AppdocCreateDocuments < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table :documents do |t|
4
4
  t.string :name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-13 00:00:00.000000000 Z
12
+ date: 2011-09-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: acts-as-taggable-on
16
- requirement: &75343890 !ruby/object:Gem::Requirement
16
+ requirement: &88628470 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *75343890
24
+ version_requirements: *88628470
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: haml
27
- requirement: &75343630 !ruby/object:Gem::Requirement
27
+ requirement: &88628070 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *75343630
35
+ version_requirements: *88628070
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: kaminari
38
- requirement: &75433740 !ruby/object:Gem::Requirement
38
+ requirement: &88624020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,18 @@ dependencies:
43
43
  version: 0.10.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *75433740
46
+ version_requirements: *88624020
47
+ - !ruby/object:Gem::Dependency
48
+ name: meta_search
49
+ requirement: &88623710 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *88623710
47
58
  description: Allows you to add documents and documentation to your app
48
59
  email:
49
60
  - ryan.e.hall@biola.edu
@@ -52,23 +63,23 @@ extensions: []
52
63
  extra_rdoc_files: []
53
64
  files:
54
65
  - app/models/document.rb
55
- - app/views/documents/show.html.haml
56
66
  - app/views/documents/new.html.haml
67
+ - app/views/documents/edit.html.haml
68
+ - app/views/documents/show.html.haml
69
+ - app/views/documents/index.html.haml
57
70
  - app/views/documents/_documents.html.haml
58
71
  - app/views/documents/_form.html.haml
59
- - app/views/documents/index.html.haml
60
72
  - app/views/documents/_index_aside.html.haml
61
- - app/views/documents/edit.html.haml
62
73
  - app/controllers/documents_controller.rb
63
- - lib/generators/appdoc/templates/public/javascripts/SmartTextBox.js
74
+ - lib/appdoc/version.rb
75
+ - lib/appdoc/engine.rb
76
+ - lib/generators/appdoc/appdoc_generator.rb
64
77
  - lib/generators/appdoc/templates/public/stylesheets/jquery/smart_text_box/imgs/close.gif
65
78
  - lib/generators/appdoc/templates/public/stylesheets/jquery/smart_text_box/SmartTextBox.css
79
+ - lib/generators/appdoc/templates/public/javascripts/SmartTextBox.js
66
80
  - lib/generators/appdoc/templates/migration.rb
67
81
  - lib/generators/appdoc/templates/appdoc_config.rb
68
- - lib/generators/appdoc/appdoc_generator.rb
69
82
  - lib/appdoc.rb
70
- - lib/appdoc/version.rb
71
- - lib/appdoc/engine.rb
72
83
  - config/routes.rb
73
84
  homepage: https://github.com/biola/appdoc
74
85
  licenses: []
@@ -90,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
101
  version: '0'
91
102
  requirements: []
92
103
  rubyforge_project: appdoc
93
- rubygems_version: 1.8.7
104
+ rubygems_version: 1.8.10
94
105
  signing_key:
95
106
  specification_version: 3
96
107
  summary: Documentation for your app