helpdesk 0.0.8 → 0.0.9
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 +4 -4
- data/app/controllers/helpdesk/faqs_controller.rb +1 -79
- data/app/views/helpdesk/faqs/index.html.haml +20 -0
- data/app/views/layouts/helpdesk/_topuser.html.haml +2 -1
- data/config/routes.rb +2 -1
- data/lib/helpdesk/version.rb +1 -1
- metadata +5 -8
- data/app/views/helpdesk/faqs/_form.html.erb +0 -33
- data/app/views/helpdesk/faqs/edit.html.erb +0 -6
- data/app/views/helpdesk/faqs/index.html.erb +0 -29
- data/app/views/helpdesk/faqs/new.html.erb +0 -5
- data/app/views/helpdesk/faqs/show.html.erb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62e85c661007c0b041b84eda3f4684badff4f8bf
|
4
|
+
data.tar.gz: b4f734ee1cc0ae6b2f901dada3651c49772f762b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9febdcbe515758f101a7605a8a017a0ba2b4738353bf9c773058217df5ad21d5ae052c3e52f3034b11c5f92119aec1a361e2361cb2874669c72cd3e028b95ba6
|
7
|
+
data.tar.gz: 48f8b2a52ef4932301367efeec8ad0f18f18f7e44778577be3dd0bd37630bddeade3a78a2f8d6239bd413465bf83fa9e0875913fa6c6408b2e0e5f47238bb6a1
|
@@ -1,85 +1,7 @@
|
|
1
1
|
module Helpdesk
|
2
2
|
class FaqsController < ApplicationController
|
3
|
-
# GET /faqs
|
4
|
-
# GET /faqs.json
|
5
3
|
def index
|
6
|
-
@faqs = Faq.
|
7
|
-
|
8
|
-
respond_to do |format|
|
9
|
-
format.html # index.html.erb
|
10
|
-
format.json { render json: @faqs }
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
# GET /faqs/1
|
15
|
-
# GET /faqs/1.json
|
16
|
-
def show
|
17
|
-
@faq = Faq.find(params[:id])
|
18
|
-
|
19
|
-
respond_to do |format|
|
20
|
-
format.html # show.html.erb
|
21
|
-
format.json { render json: @faq }
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# GET /faqs/new
|
26
|
-
# GET /faqs/new.json
|
27
|
-
def new
|
28
|
-
@faq = Faq.new
|
29
|
-
|
30
|
-
respond_to do |format|
|
31
|
-
format.html # new.html.erb
|
32
|
-
format.json { render json: @faq }
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
# GET /faqs/1/edit
|
37
|
-
def edit
|
38
|
-
@faq = Faq.find(params[:id])
|
39
|
-
end
|
40
|
-
|
41
|
-
# POST /faqs
|
42
|
-
# POST /faqs.json
|
43
|
-
def create
|
44
|
-
@faq = Faq.new(params[:faq])
|
45
|
-
|
46
|
-
respond_to do |format|
|
47
|
-
if @faq.save
|
48
|
-
format.html { redirect_to @faq, notice: 'Faq was successfully created.' }
|
49
|
-
format.json { render json: @faq, status: :created, location: @faq }
|
50
|
-
else
|
51
|
-
format.html { render action: "new" }
|
52
|
-
format.json { render json: @faq.errors, status: :unprocessable_entity }
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
# PUT /faqs/1
|
58
|
-
# PUT /faqs/1.json
|
59
|
-
def update
|
60
|
-
@faq = Faq.find(params[:id])
|
61
|
-
|
62
|
-
respond_to do |format|
|
63
|
-
if @faq.update_attributes(params[:faq])
|
64
|
-
format.html { redirect_to @faq, notice: 'Faq was successfully updated.' }
|
65
|
-
format.json { head :no_content }
|
66
|
-
else
|
67
|
-
format.html { render action: "edit" }
|
68
|
-
format.json { render json: @faq.errors, status: :unprocessable_entity }
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
# DELETE /faqs/1
|
74
|
-
# DELETE /faqs/1.json
|
75
|
-
def destroy
|
76
|
-
@faq = Faq.find(params[:id])
|
77
|
-
@faq.destroy
|
78
|
-
|
79
|
-
respond_to do |format|
|
80
|
-
format.html { redirect_to faqs_url }
|
81
|
-
format.json { head :no_content }
|
82
|
-
end
|
4
|
+
@faqs = Helpdesk::Faq.active
|
83
5
|
end
|
84
6
|
end
|
85
7
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
%div.content
|
2
|
+
%div.pageContainer
|
3
|
+
%h1
|
4
|
+
Często zadawane pytania
|
5
|
+
%ol#faq
|
6
|
+
- @faqs.each do |faq|
|
7
|
+
%li{:id=>"link#{faq.id}"}
|
8
|
+
%h3
|
9
|
+
= link_to faq.title, "\#link#{faq.id}"
|
10
|
+
%div{style:"display:none"}
|
11
|
+
= raw faq.text
|
12
|
+
|
13
|
+
- content_for :scripts do
|
14
|
+
:javascript
|
15
|
+
$(document).ready(function(){
|
16
|
+
$('ol#faq li h3').click(function () {
|
17
|
+
$(this).parent().find('div').slideToggle('fast');
|
18
|
+
});
|
19
|
+
$("a[href='" + window.location.hash + "']").click();
|
20
|
+
});
|
data/config/routes.rb
CHANGED
data/lib/helpdesk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helpdesk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Beynon Wacław Łuczak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: launchy
|
@@ -352,11 +352,7 @@ files:
|
|
352
352
|
- app/views/helpdesk/admin/tickets/new.html.haml
|
353
353
|
- app/views/helpdesk/admin/tickets/show.html.haml
|
354
354
|
- app/views/helpdesk/dashboard/index.html.erb
|
355
|
-
- app/views/helpdesk/faqs/
|
356
|
-
- app/views/helpdesk/faqs/edit.html.erb
|
357
|
-
- app/views/helpdesk/faqs/index.html.erb
|
358
|
-
- app/views/helpdesk/faqs/new.html.erb
|
359
|
-
- app/views/helpdesk/faqs/show.html.erb
|
355
|
+
- app/views/helpdesk/faqs/index.html.haml
|
360
356
|
- app/views/helpdesk/notifications_mailer/comment_by_helpdesk_confirmation.pl.html.haml
|
361
357
|
- app/views/helpdesk/notifications_mailer/comment_by_helpdesk_notification.pl.html.haml
|
362
358
|
- app/views/helpdesk/notifications_mailer/comment_by_requester_confirmation.pl.html.haml
|
@@ -402,7 +398,8 @@ files:
|
|
402
398
|
- MIT-LICENSE
|
403
399
|
- Rakefile
|
404
400
|
homepage: http://github.com/wacaw/helpdesk
|
405
|
-
licenses:
|
401
|
+
licenses:
|
402
|
+
- MIT
|
406
403
|
metadata: {}
|
407
404
|
post_install_message:
|
408
405
|
rdoc_options: []
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<%= form_for(@faq) do |f| %>
|
2
|
-
<% if @faq.errors.any? %>
|
3
|
-
<div id="error_explanation">
|
4
|
-
<h2><%= pluralize(@faq.errors.count, "error") %> prohibited this faq from being saved:</h2>
|
5
|
-
|
6
|
-
<ul>
|
7
|
-
<% @faq.errors.full_messages.each do |msg| %>
|
8
|
-
<li><%= msg %></li>
|
9
|
-
<% end %>
|
10
|
-
</ul>
|
11
|
-
</div>
|
12
|
-
<% end %>
|
13
|
-
|
14
|
-
<div class="field">
|
15
|
-
<%= f.label :title %><br />
|
16
|
-
<%= f.text_field :title %>
|
17
|
-
</div>
|
18
|
-
<div class="field">
|
19
|
-
<%= f.label :text %><br />
|
20
|
-
<%= f.text_area :text %>
|
21
|
-
</div>
|
22
|
-
<div class="field">
|
23
|
-
<%= f.label :position %><br />
|
24
|
-
<%= f.number_field :position %>
|
25
|
-
</div>
|
26
|
-
<div class="field">
|
27
|
-
<%= f.label :active %><br />
|
28
|
-
<%= f.check_box :active %>
|
29
|
-
</div>
|
30
|
-
<div class="actions">
|
31
|
-
<%= f.submit %>
|
32
|
-
</div>
|
33
|
-
<% end %>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<h1>Listing faqs</h1>
|
2
|
-
|
3
|
-
<table>
|
4
|
-
<tr>
|
5
|
-
<th>Title</th>
|
6
|
-
<th>Text</th>
|
7
|
-
<th>Position</th>
|
8
|
-
<th>Active</th>
|
9
|
-
<th></th>
|
10
|
-
<th></th>
|
11
|
-
<th></th>
|
12
|
-
</tr>
|
13
|
-
|
14
|
-
<% @faqs.each do |faq| %>
|
15
|
-
<tr>
|
16
|
-
<td><%= faq.title %></td>
|
17
|
-
<td><%= faq.text %></td>
|
18
|
-
<td><%= faq.position %></td>
|
19
|
-
<td><%= faq.active %></td>
|
20
|
-
<td><%= link_to 'Show', faq %></td>
|
21
|
-
<td><%= link_to 'Edit', edit_faq_path(faq) %></td>
|
22
|
-
<td><%= link_to 'Destroy', faq, confirm: 'Are you sure?', method: :delete %></td>
|
23
|
-
</tr>
|
24
|
-
<% end %>
|
25
|
-
</table>
|
26
|
-
|
27
|
-
<br />
|
28
|
-
|
29
|
-
<%= link_to 'New Faq', new_faq_path %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<p id="notice"><%= notice %></p>
|
2
|
-
|
3
|
-
<p>
|
4
|
-
<b>Title:</b>
|
5
|
-
<%= @faq.title %>
|
6
|
-
</p>
|
7
|
-
|
8
|
-
<p>
|
9
|
-
<b>Text:</b>
|
10
|
-
<%= raw @faq.text %>
|
11
|
-
</p>
|
12
|
-
|
13
|
-
<p>
|
14
|
-
<b>Position:</b>
|
15
|
-
<%= @faq.position %>
|
16
|
-
</p>
|
17
|
-
|
18
|
-
<p>
|
19
|
-
<b>Active:</b>
|
20
|
-
<%= @faq.active %>
|
21
|
-
</p>
|
22
|
-
|
23
|
-
|
24
|
-
<%= link_to 'Edit', edit_faq_path(@faq) %> |
|
25
|
-
<%= link_to 'Back', faqs_path %>
|