forked from publify/publify
/
permalinks.html.erb
47 lines (41 loc) · 2.25 KB
/
permalinks.html.erb
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
<% @page_heading = _('Permalinks') %>
<% @page_heading_class = 'icon-settings' %>
<%= error_messages_for 'blog' %>
<%= form_tag :action => 'permalinks' do %>
<p><%= _("Publify offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links.") %></p>
<p><%= _("Here are some examples to get you started.") %></p>
<div class='form-horizontal'>
<div class='control-group'>
<label class='control-label'><%= _("Permalink format") %></label>
<div class='controls'>
<label class='radio' for="setting_permalink_format_yearmonthdaytitle">
<%= radio_button(:setting, :permalink_format, '/%year%/%month%/%day%/%title%') %>
<%= _("Date and title") %>
<span class='help-block'><%= "#{this_blog.base_url}/#{Time.now.strftime('%Y/%m/%d')}/sample-article" %></span>
</label>
<label class='radio' for="setting_permalink_format_yearmonthtitle">
<%= radio_button(:setting, :permalink_format, '/%year%/%month%/%title%') %>
<%= _("Month and title") %>
<span class='help-block'><%= "#{this_blog.base_url}/#{Time.now.strftime('%Y/%m')}/sample-article" %></span>
</label>
<label class='radio' for="setting_permalink_format_title">
<%= radio_button(:setting, :permalink_format, '/%title%') %> <%= _("Title only") %>
<span class='help-block'><%= "#{this_blog.base_url}/sample-article" %></span>
</label>
<label class='radio' for="setting_permalink_format_custom">
<%= radio_button(:setting, :permalink_format, 'custom') %> <%= _("Custom") %>
<%= text_field(:setting, :custom_permalink, { :class => 'span5 '})%>
</label>
</div>
</div>
</div>
<p class='clear'><%= _("You can custom your URL structure using the following tags:") %></p>
<ul>
<li><code>%title%</code>: <%= _("your article slug. <strong>Using this slug is mandatory</strong>.") %></li>
<li><code>%year%</code>: <%= _("your article year of publication.") %></li>
<li><code>%month%</code>: <%= _("your article month of publication.") %></li>
<li><code>%day%</code>: <%= _("your article day of publication.") %></li>
</ul>
<%= save_settings %>
<%= hidden_field_tag 'from', 'permalinks' %>
<% end %>