chili_presentations 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Manifest.txt +1 -0
- data/app/controllers/presentations_controller.rb +12 -0
- data/app/views/presentations/index.html.erb +1 -0
- data/app/views/presentations/instructions.html.erb +38 -0
- data/assets/stylesheets/presentations.css +21 -0
- data/config/locales/en.yml +2 -0
- data/config/routes.rb +1 -1
- data/init.rb +1 -0
- data/lang/en.yml +2 -0
- data/lib/chili_presentations/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -2
- metadata.gz.sig +2 -1
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -12,6 +12,7 @@ app/models/presentation_observer.rb
|
|
12
12
|
app/views/presentations/_shared_form.html.erb
|
13
13
|
app/views/presentations/edit.html.erb
|
14
14
|
app/views/presentations/index.html.erb
|
15
|
+
app/views/presentations/instructions.html.erb
|
15
16
|
app/views/presentations/new.html.erb
|
16
17
|
assets/stylesheets/forms.css
|
17
18
|
assets/stylesheets/presentations.css
|
@@ -7,6 +7,9 @@ class PresentationsController < ApplicationController
|
|
7
7
|
@presentations = @project.presentations
|
8
8
|
end
|
9
9
|
|
10
|
+
def instructions
|
11
|
+
end
|
12
|
+
|
10
13
|
def new
|
11
14
|
@versions = @project.versions.open
|
12
15
|
end
|
@@ -58,6 +61,12 @@ class PresentationsController < ApplicationController
|
|
58
61
|
redirect_to project_presentations_path(@project)
|
59
62
|
end
|
60
63
|
|
64
|
+
def download
|
65
|
+
send_data presentation.contents.path,
|
66
|
+
:filename => presentation.contents_file_name,
|
67
|
+
:type => presentation.contents.content_type
|
68
|
+
end
|
69
|
+
|
61
70
|
private
|
62
71
|
def presentation_params
|
63
72
|
params[:presentation].merge({:user_id => User.current.id})
|
@@ -71,6 +80,9 @@ class PresentationsController < ApplicationController
|
|
71
80
|
case presentation.x_accel_redirect_path_to(params[:static_asset_path])
|
72
81
|
when /\.css$/ then "text/css"
|
73
82
|
when /\.js$/ then "text/javascript"
|
83
|
+
when /\.png$/ then "image/png"
|
84
|
+
when /\.gif$/ then "image/gif"
|
85
|
+
when /\.(jpeg|jpg)$/ then "image/jpeg"
|
74
86
|
else "text/html"
|
75
87
|
end
|
76
88
|
end
|
@@ -21,6 +21,7 @@
|
|
21
21
|
<%= link_to presentation.title, project_presentation_path(@project, presentation, :trailing_slash => true) %>
|
22
22
|
<span class="manage-links">
|
23
23
|
<%= link_to(l(:view_specific_presentation_label), project_presentation_path(@project, presentation, :trailing_slash => true), :class => 'icon icon-file presentation-show') if User.current.allowed_to?(:view_specific_presentation, nil, :global => true) %>
|
24
|
+
<%= link_to(l(:download_presentation_label), instructions_project_presentation_path(@project, presentation), :class => 'icon icon-file application-zip presentation-show') if User.current.allowed_to?(:download_presentations, nil, :global => true) %>
|
24
25
|
<%= link_to(l(:edit_presentation_label), edit_project_presentation_path(@project, presentation), :class => 'icon icon-edit presentation-edit') if User.current.allowed_to?(:modify_presentations, nil, :global => true) %>
|
25
26
|
<%= link_to(l(:delete_presentation_label), project_presentation_path(@project, presentation), :class => 'icon icon-del presentation-del', :confirm => l(:confirm_presentation_deletion), :method => :delete) if User.current.allowed_to?(:delete_presentation, nil, :global => true) %>
|
26
27
|
</span>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<% content_for :header_tags do %>
|
2
|
+
<%= stylesheet_link_tag '/plugin_assets/chili_presentations/stylesheets/presentations' %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<div class="contextual">
|
6
|
+
<%= link_to(l(:return_to_presentations_list_label), project_presentations_path(@project), :class => "icon icon-history") if User.current.allowed_to?(:view_presentation_list, nil, :global => true) %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<h2>Before You Click "Download"...</h2>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
Note that the file you will be downloading is a zipped directory containing an
|
13
|
+
<code>index.html</code> file and any images, stylesheets or supporting HTML
|
14
|
+
pages necessary.
|
15
|
+
</p>
|
16
|
+
|
17
|
+
<h3>To view the presentation locally...</h3>
|
18
|
+
|
19
|
+
<ol class="steps">
|
20
|
+
<li>
|
21
|
+
<em>Unzip the folder.</em>
|
22
|
+
<span class="mute">Be sure to unzip it and not just let Windows Explorer
|
23
|
+
"navigate" it the directory for you, as it will not load assets like
|
24
|
+
stylesheets and images correctly if you do that.
|
25
|
+
</span>
|
26
|
+
</li>
|
27
|
+
<li>
|
28
|
+
<em>Open the <code>index.html</code> file</em>.
|
29
|
+
<span class="mute">
|
30
|
+
Ideally in Chrome, Firefix, or Safari web browser. Internet Explorer is
|
31
|
+
very "hit-or-miss" on these types of web pages.
|
32
|
+
</span>
|
33
|
+
</li>
|
34
|
+
</ol>
|
35
|
+
|
36
|
+
<p class="download">
|
37
|
+
<%= link_to "Got it. Let me download it now...", download_project_presentation_path(@project, @presentation) %>
|
38
|
+
</p>
|
@@ -1,3 +1,18 @@
|
|
1
|
+
ol.steps {
|
2
|
+
list-style-type: decimal;
|
3
|
+
padding-left: 20px;
|
4
|
+
}
|
5
|
+
|
6
|
+
ol.steps em {
|
7
|
+
text-decoraton: none;
|
8
|
+
font-weight: bold;
|
9
|
+
font-style: normal;
|
10
|
+
}
|
11
|
+
|
12
|
+
.mute {
|
13
|
+
color: gray;
|
14
|
+
}
|
15
|
+
|
1
16
|
ul.presentations li {
|
2
17
|
list-style-type: none;
|
3
18
|
float: left;
|
@@ -67,3 +82,9 @@ ul.presentations li:hover {
|
|
67
82
|
padding-right: 5px;
|
68
83
|
padding-top: 7px;
|
69
84
|
}
|
85
|
+
|
86
|
+
.download {
|
87
|
+
padding: 1em;
|
88
|
+
font-size: 2em;
|
89
|
+
text-align: center;
|
90
|
+
}
|
data/config/locales/en.yml
CHANGED
@@ -9,7 +9,9 @@ en:
|
|
9
9
|
new_presentation_label: Add presentation
|
10
10
|
delete_presentation_label: Delete this presentation
|
11
11
|
edit_presentation_label: Edit this presentation
|
12
|
+
download_presentation_label: Download presentation
|
12
13
|
view_specific_presentation_label: View presentation
|
14
|
+
return_to_presentations_list_label: Back to list of presentations
|
13
15
|
confirm_presentation_deletion: Are you sure you want to delete this presentation?
|
14
16
|
presentation_deleted_message: "Booyah! The requested presentation has been deleted."
|
15
17
|
field_contents: "'Select file to upload' field"
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
ActionController::Routing::Routes.draw do |map|
|
2
|
-
map.resources :presentations, :name_prefix => 'project_', :path_prefix => '/projects/:project_id', :
|
2
|
+
map.resources :presentations, :name_prefix => 'project_', :path_prefix => '/projects/:project_id', :member => {:download => :get, :instructions => :get}
|
3
3
|
map.connect '/projects/:project_id/presentations/:id/*static_asset_path', :controller => 'presentations', :action => 'show'
|
4
4
|
end
|
data/init.rb
CHANGED
@@ -27,6 +27,7 @@ Redmine::Plugin.register 'chili_presentations' do
|
|
27
27
|
project_module :presentations do
|
28
28
|
permission :view_presentation_list, {:presentations => [:index]}
|
29
29
|
permission :view_specific_presentation, {:presentations => [:show]}
|
30
|
+
permission :download_presentation, {:presentations => [:download, :instructions]}, {:require => :member}
|
30
31
|
permission :modify_presentation, {:presentations => [:edit,:update]}, {:require => :member}
|
31
32
|
permission :delete_presentation, {:presentations => [:destroy]}, {:require => :member}
|
32
33
|
permission :add_presentation, {:presentations => [:new, :create]}, {:require => :member}
|
data/lang/en.yml
CHANGED
@@ -9,7 +9,9 @@ default_presentation_title: (none provided)
|
|
9
9
|
new_presentation_label: Add presentation
|
10
10
|
delete_presentation_label: Delete this presentation
|
11
11
|
edit_presentation_label: Edit this presentation
|
12
|
+
download_presentation_label: Download presentation
|
12
13
|
view_specific_presentation_label: View presentation
|
14
|
+
return_to_presentations_list_label: Back to list of presentations
|
13
15
|
confirm_presentation_deletion: Are you sure you want to delete this presentation?
|
14
16
|
presentation_deleted_message: "Booyah! The requested presentation has been deleted."
|
15
17
|
field_contents: "'Select file to upload' field"
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chili_presentations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
L1dHTHNEVk9tZ0orZzR4b09pQ2U5WkVrZGE4SytsL0YKeVhXcUluUmxGSWxU
|
37
37
|
dXdGVHhqMjZqYXVCb3NrQlBvejViZmtaRmphVlJoeVVuUm5Ha2E2Nmx2Y0RP
|
38
38
|
R2ZrUlpXUQpOVkFESkE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
39
|
-
date: 2012-
|
39
|
+
date: 2012-10-22 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: friendly_id
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- app/views/presentations/_shared_form.html.erb
|
134
134
|
- app/views/presentations/edit.html.erb
|
135
135
|
- app/views/presentations/index.html.erb
|
136
|
+
- app/views/presentations/instructions.html.erb
|
136
137
|
- app/views/presentations/new.html.erb
|
137
138
|
- assets/stylesheets/forms.css
|
138
139
|
- assets/stylesheets/presentations.css
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
T85����p��1y�Q.٬��Ѯ�O��4���'&����{#�ѱ�pP�V�0�1��~ ��u\�+m�x����$�i-^���JM�Y;K.ro�r
|
2
|
+
<&�}��HB��xފ~U���\�r]�rk�"�C�i�����Sn#���飊���k��װ�>�3��C��-L�m��P�XQ{�~z�A�P�������6���@��8U��u�L;����+w7��K{5t�s�g���Ɲ����O��
|