public
Description: Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.
Homepage: http://kete.net.nz/
Clone URL: git://github.com/kete/kete.git
kete / app / views / baskets / appearance.html.erb
100644 152 lines (118 sloc) 6.33 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<% @title = @current_basket.name + ' Appearance' -%>
 
<%= render(:partial => "actions_menu",
           :locals => { :item => @basket }) %>
 
<%= render :partial => "topics/content_wrapper_start" %>
 
<h2><%= h(@title) -%></h2>
 
<% form_tag :action => 'update_appearance', :id => @basket do %>
 
<fieldset>
 
  <div class="form-element">
    <label for="settings_theme_font_family">Font Family:</label>
    <%= select_tag 'settings[theme_font_family]', @basket.font_family_select_options, {"id" => "settings_theme_font_family", :tabindex => '1'} %>
  </div>
 
  <div class="form-element">
    <%= image_tag(@basket.settings[:header_image], :alt => "Current Basket Header Image. ") + "<br />" if !@basket.settings[:header_image].blank? -%>
    <label for="settings_header_image">URL for background image for the top of each page:</label>
    <%= text_field 'settings', 'header_image', { "id" => "settings_header_image", :tabindex => '1', :value => @basket.settings[:header_image] } %>
  </div>
 
  <div class="form-element">
    <label for="settings_theme">Theme:</label>
    <fieldset>
      <% if @basket.possible_themes.size > 0 -%>
      <% @basket.possible_themes.each do |theme| -%>
      <div class="theme-choice-wrapper">
        <%= image_tag "/themes/#{theme}/images/sample.jpg", :alt => "Screenshot of #{theme} theme. " -%>
        <div class="theme-choice-text">
          <%= radio_button_tag 'settings[theme]', theme, (@basket.settings[:theme] == theme), {"id" => "settings_theme", :tabindex => '1'} %>
          <%= theme.humanize %>
        </div>
      </div>
      &nbsp;
      <% end -%>
      <% else -%>
      <p>No themes beyond the default are available right now.</p>
      <% end -%>
 
      <% if @site_admin -%>
      <div>
        <ul>
          <li><%= link_to "Add new theme", {:action => 'new', :controller => 'documents', :is_theme => true}, :tabindex => '1' -%></li>
        </ul>
      </div>
      <% end -%>
 
    </fieldset>
  </div>
 
  <div class="form-element">
    <label>Show/Hide Controls:</label>
 
    <fieldset>
 
      <div class="form-element">
        <label for="settings_show_action_menu">Show Action Menu to:</label>
        <%= select_tag 'settings[show_action_menu]', @basket.show_action_menu_as_options(@site_basket), {"id" => "settings_show_action_menu", :tabindex => '1'} %><br />
        (who can see the view, edit, history and other links)
      </div>
 
 
      <div class="form-element">
        <label for="settings_show_discussion">Show Comments to:</label>
        <%= select_tag 'settings[show_discussion]', @basket.show_discussion_as_options(@site_basket), {"id" => "settings_show_discussion", :tabindex => '1'} %><br />
        (who can see and add comments)
      </div>
 
      <div class="form-element">
        <label for="settings_show_flagging">Show Flagging to:</label>
        <%= select_tag 'settings[show_flagging]', @basket.show_flagging_as_options(@site_basket), {"id" => "settings_show_flagging", :tabindex => '1'} %><br />
        (who can flag items)
      </div>
 
      <div class="form-element">
        <label for="settings_show_add_links">Show Add Links to:</label>
        <%= select_tag 'settings[show_add_links]', @basket.show_add_links_as_options(@site_basket), {"id" => "settings_show_add_links", :tabindex => '1'} %><br />
        (who can relate or link items together)
      </div>
    </fieldset>
  </div>
 
  <% if USES_BASKET_LIST_NAVIGATION_MENU_ON_EVERY_PAGE -%>
  <div class="form-element">
    <label>Basket List Menu Options:</label>
 
    <fieldset>
 
      <p>These settings only take effect if the basket list navigation menu is on in your template.</p>
 
      <div class="form-element">
        <label for="settings_side_menu_number_of_topics">Number of
        topics to show when in this basket?:</label>
        <%= text_field_tag 'settings[side_menu_number_of_topics]', @basket.settings[:side_menu_number_of_topics], {:size => 3, "id" => "settings_side_menu_number_of_topics", :tabindex => '1'} %>
      </div>
 
      <div class="form-element">
        <label for="settings_side_menu_ordering_of_topics" style="width: 100%;">Sort by:</label>
        <div style="clear: left;"><%= select_tag 'settings[side_menu_ordering_of_topics]', @basket.side_menu_ordering_of_topics_as_options(@site_basket), {"id" => "side_menu_ordering_of_topics", :tabindex => '1'} %></div>
      </div>
 
      <div class="form-element">
        <%= check_box 'settings', 'side_menu_direction_of_topics', {:checked => (@basket.settings[:side_menu_direction_of_topics] == 'reverse'), :tabindex => '1'}, 'reverse', '' %>
        <label for="settings_side_menu_direction_of_topics" class="inline">in reverse?</label>
      </div>
 
    </fieldset>
  </div>
  <% end -%>
 
  <div class="form-element">
    <label>Additional Footer Content:</label>
    <fieldset>
      <div class="form-element">
        <%= text_area 'settings', 'additional_footer_content', :rows => 7, :cols => 30, :class => 'mceEditor', :value => @basket.settings[:additional_footer_content] -%>
      </div>
      <div class="form_example">
        Note: forms and javascript are not allowed for security reasons.
        <% if @site_admin -%>Unless you check the box below.<% end -%>
      </div>
      <% if @site_admin -%>
      <div class="form-element">
        <%= check_box 'settings', 'do_not_sanitize_footer_content', {:checked => (@basket.settings[:do_not_sanitize_footer_content] == true), :tabindex => '1'}, 'true', 'false' %>
        <label for="settings_do_not_sanitize_footer_content" class="inline">Allow
          forms and other possible insecure elements and attributes in
          the HTML?</label><br />
      </div>
      <% end -%>
      <div class="form-element">
        <%= check_box 'settings', 'replace_existing_footer', {:checked => (@basket.settings[:replace_existing_footer] == true), :tabindex => '1'}, 'true', 'false' -%>
        <label for="settings_replace_existing_footer" class="inline">replace existing footer with above content?</label>
      </div>
    </fieldset>
  </div>
 
  <strong><%= basket_preferences_inheritance_message %></strong>
 
</fieldset>
 
<div style="margin:0;padding:0"><%= submit_tag 'Save' , {:class => "save-button", :tabindex => '1'} %></div>
<% end %>
 
 
 
<%= link_to_cancel %>
 
<%= render(:partial => "topics/content_wrapper_end" ) %>