Skip to content

Commit

Permalink
Moved /admin/user_guide to usage in user_guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
fesplugas committed Sep 5, 2011
1 parent 7194edb commit 6fe8d71
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 108 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
= 3.2.0 (unreleased)

= 3.1.0 (unreleased)
= 3.1.1 (unreleased)

* [CHANGED] Removed user guide. Docs can now be found at http://docs.typuscmf.com/

= 3.1.0

* [NEW] Filter with scopes.

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/admin/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ class Admin::BaseController < ActionController::Base
helper_method :admin_user
helper_method :current_role

def user_guide; end

protected

def reload_config_and_roles
Expand Down
87 changes: 0 additions & 87 deletions app/views/admin/base/user_guide.html.erb

This file was deleted.

4 changes: 2 additions & 2 deletions app/views/admin/dashboard/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<%
mailing_list = link_to('mailing list', 'http://groups.google.com/group/typus')
user_guide = link_to('user guide', admin_user_guide_path)
user_guide = link_to('user guide', 'http://docs.typuscmf.com/')
%>

<p>If you need help don't hesitate in joining the <%= mailing_list %> or use
the provided <%= user_guide %>.</p>
the <%= user_guide %>.</p>

<p>Replace this sidebar dropping a file named <code>_sidebar.html.erb</code>
on the <code>app/views/admin/dashboard</code> folder.</p>
2 changes: 0 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
match "dashboard" => "dashboard#index", :as => "dashboard_index"
match "dashboard/:application" => "dashboard#show", :as => "dashboard"

match "user_guide" => "base#user_guide"

if Typus.authentication == :session
resource :session, :only => [:new, :create], :controller => :session do
get :destroy, :as => "destroy"
Expand Down
1 change: 1 addition & 0 deletions doc/user_guide/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Misc
.. toctree::
:maxdepth: 1

usage
upgrade
credits
license
Expand Down
59 changes: 59 additions & 0 deletions doc/user_guide/source/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Usage
=====

With **Typus**, also known as the control panel or admin interface, you'll be
able to update your application contents and perform the most common operations
for the site maintenance.


Basic Actions
-------------

Create Entries
^^^^^^^^^^^^^^

To create a new entry:

* Click on entries tab.
* Click "Add New" sub tab.
* Start filling in the blanks.
* When you are ready, click "Save Entry".

Editing and Updating Entries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To edit entries:

* Click on entries tab.
* You'll see a list of entries, if you have already create some.
* Click on "Edit".
* Edit the entry.
* When you are ready, click "Save".

Removing Entries
^^^^^^^^^^^^^^^^

To remove entries:

* Click on entries tab.
* You'll see a list of entries, if you have already create some.
* Click on "Trash".
* Click "Ok" on the dialog to confirm you want to remove the entry.

.. note::

Removing entries will be only available if you have permissions to do so.


Registered Users
----------------

Registered users can do a variety of different things on a **Typus** driven
site. The various elements available to the user are determined by their user
level.

When ``:session`` authentication is enabled **Typus** will enable a a default
role which will allow registered users perform all kind of operations on
entries: create, read, update and destroy.

It's usually recommended having an extra role which some restrictions.
14 changes: 3 additions & 11 deletions test/app/controllers/admin/base_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,14 @@
What's being tested here?
- Access to user_guide.
- Nothing ...
=end

class Admin::BaseControllerTest < ActionController::TestCase

test "user_guide is not displayed when user is not logged in" do
get :user_guide
assert_response :redirect
assert_redirected_to new_admin_session_path
end

test "user_guide is displayed when user is logged in" do
admin_sign_in
get :user_guide
assert_response :success
test "nothing" do
assert true
end

end
15 changes: 12 additions & 3 deletions test/dummy/app/views/admin/dashboard/_sidebar.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<!-- dashboard#_sidebar.html.erb -->

<%
code = link_to('GitHub', 'https://github.com/typus/typus/tree/master/test/dummy')
typus = link_to('Typus', 'http://www.typuscmf.com/')
mailing_list = link_to('mailing list', 'http://groups.google.com/group/typus')
user_guide = link_to('user guide', 'http://docs.typuscmf.com/')
%>

<h2>Welcome!</h2>

<p>This is the collection of models, organized by functionality, I use to <strong>test</strong> <a href="http://www.typuscmf.com/" title="Typus">Typus</a>.</p>
<p>This is the collection of models, organized by functionality, I use to
<strong>test</strong> <%= typus %>.</p>

<p>Code for this application is available at <a href="https://github.com/typus/typus/tree/master/test/dummy">GitHub</a>.</p>
<p>Code for this application is available at <%= code %>.</p>

<p>If you need help don't hesitate in joining the <%= link_to 'mailing list', 'http://groups.google.com/group/typus' %> or use the <%= link_to "help", "/admin/user_guide" %>.</p>
<p>If you need help don't hesitate in joining the <%= mailing_list %> or use
the <%= user_guide %>.</p>

0 comments on commit 6fe8d71

Please sign in to comment.