Skip to content

Commit 535d8df

Browse files
committed
applied a bunch of easy autocorrections
1 parent 9233b4c commit 535d8df

38 files changed

Lines changed: 314 additions & 310 deletions

app/views/admin/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<% content_for :title, t('admin.dashboard.title') %>
22

3-
<%= link_to moderator_path, class: "has-font-size-small" do %>
3+
<%= link_to moderator_path, class: 'has-font-size-small' do %>
44
Switch to Moderator Tools
55
<% end %>
66

app/views/admin/new_site.html.erb

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
<h1>Create New Site</h1>
2-
3-
<div class="notice is-danger">
4-
<p><strong>Attention!</strong> You are about to create a new site in this network. You will not be able to undo this later. You'll need access to the server configuration to complete this process.</p>
5-
</div>
6-
7-
<h2>Site Configuration</h2>
8-
9-
<%= form_for @new_community, url: create_site_path do |f| %>
10-
11-
<div class="form-group">
12-
<%= f.label :name, 'Community name', class: 'form-element' %>
13-
<%= f.text_field :name, class: 'form-element' %>
14-
</div>
15-
16-
<div class="form-group">
17-
<%= f.label :host, 'Primary community host', class: 'form-element' %>
18-
<div class="form-caption">This is likely something like X.codidact.com. Without / and https://. You can set up secondary community hosts (redirect) later in the server configuration.</div>
19-
<%= f.text_field :host, class: 'form-element' %>
20-
</div>
21-
22-
<%= f.submit "Create new site", class: 'button is-danger is-filled' %>
23-
1+
<h1>Create New Site</h1>
2+
3+
<div class="notice is-danger">
4+
<p><strong>Attention!</strong> You are about to create a new site in this network. You will not be able to undo this later. You'll need access to the server configuration to complete this process.</p>
5+
</div>
6+
7+
<h2>Site Configuration</h2>
8+
9+
<%= form_for @new_community, url: create_site_path do |f| %>
10+
11+
<div class="form-group">
12+
<%= f.label :name, 'Community name', class: 'form-element' %>
13+
<%= f.text_field :name, class: 'form-element' %>
14+
</div>
15+
16+
<div class="form-group">
17+
<%= f.label :host, 'Primary community host', class: 'form-element' %>
18+
<div class="form-caption">This is likely something like X.codidact.com. Without / and https://. You can set up secondary community hosts (redirect) later in the server configuration.</div>
19+
<%= f.text_field :host, class: 'form-element' %>
20+
</div>
21+
22+
<%= f.submit 'Create new site', class: 'button is-danger is-filled' %>
23+
2424
<% end %>

app/views/admin/setup.html.erb

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
1-
<h1>Create New Site</h1>
2-
3-
<p class="is-lead">Welcome to your new <%= @community.name %> community!</p>
4-
5-
<p>We are almost ready. We just need some more information to complete creation of the site.</p>
6-
7-
<p>Don't worry. You will be able to change all these things in the site settings later.</p>
8-
9-
<%= form_tag setup_save_url do %>
10-
11-
<div class="widget">
12-
<div class="widget--body">
13-
14-
<h2>Site Details</h2>
15-
16-
<div class="form-group">
17-
<%= label_tag :primary_color, 'Primary color', class: 'form-element' %>
18-
<span class="form-caption">Select a primary color for this site. Will be used as default for all categories.</span>
19-
<%= select_tag :primary_color, options_for_select(['turquoise', 'green', 'blue', 'darkblue', 'purple', 'gray', 'bluegray', 'yellow', 'orange', 'pink', 'red'],
20-
selected: SiteSetting['SiteCategoryHeaderDefaultColor']),
21-
class: 'form-element' %>
22-
</div>
23-
24-
<div class="form-group">
25-
<%= label_tag :logo_url, 'Site logo URL', class: 'form-element' %>
26-
<span class="form-caption">Choose a site logo for this site. Will be shown in the site header.</span>
27-
<%= text_field_tag :logo_url, SiteSetting['SiteLogoPath'], class: 'form-element' %>
28-
</div>
29-
30-
<div class="form-group">
31-
<%= label_tag :ad_slogan, 'Site Ad Slogan', class: 'form-element' %>
32-
<span class="form-caption">A slogan that will be shown in automatic community ads. See <a href="/ca">/ca</a> for more info.</span>
33-
<%= text_field_tag :ad_slogan, SiteSetting['SiteAdSlogan'], class: 'form-element' %>
34-
</div>
35-
36-
</div>
37-
</div>
38-
<div class="widget">
39-
<div class="widget--body">
40-
41-
<h2>Additional Features</h2>
42-
43-
<div class="form-group">
44-
<%= label_tag :mathjax, 'Enable MathJax', class: 'form-element' %>
45-
<span class="form-caption">MathJax is a library for rendering mathematic formulas. This will incur a small penalty in page loading time.</span>
46-
<%= select_tag :mathjax, options_for_select([['yes', true], ['no', false]], selected: SiteSetting['MathJaxEnabled']),
47-
class: 'form-element' %>
48-
</div>
49-
50-
<div class="form-group">
51-
<%= label_tag :syntax_highlighting, 'Enable Syntax Highlighting', class: 'form-element' %>
52-
<span class="form-caption">We support highlighting of code blocks using highlight.js. This will incur a small penalty in page loading time.</span>
53-
<%= select_tag :syntax_highlighting, options_for_select([['yes', true], ['no', false]], selected: SiteSetting['SyntaxHighlightingEnabled']),
54-
class: 'form-element' %>
55-
</div>
56-
57-
</div>
58-
</div>
59-
<div class="widget">
60-
<div class="widget--body">
61-
62-
<h2>Integrations</h2>
63-
64-
<div class="form-group">
65-
<%= label_tag :chat_link, 'Community chat link', class: 'form-element' %>
66-
<span class="form-caption">Link to a possible community chat. Can be kept empty if not needed.</span>
67-
<%= text_field_tag :chat_link, SiteSetting['ChatLink'], class: 'form-element' %>
68-
</div>
69-
70-
<div class="form-group">
71-
<%= label_tag :analytics_url, 'Analytics URL', class: 'form-element' %>
72-
<span class="form-caption">Full URL to a Matomo analytics instance, with leading protocol and trailing slash.</span>
73-
<%= text_field_tag :analytics_url, SiteSetting['AnalyticsURL'], class: 'form-element' %>
74-
</div>
75-
76-
<div class="form-group">
77-
<%= label_tag :analytics_id, 'Analytics Site ID', class: 'form-element' %>
78-
<span class="form-caption">Site ID for this community in your Matomo analytics instance.</span>
79-
<%= text_field_tag :analytics_id, SiteSetting['AnalyticsSiteId'], class: 'form-element' %>
80-
</div>
81-
82-
<div class="form-group">
83-
<%= label_tag :content_transfer, 'Has content transfer?', class: 'form-element' %>
84-
<span class="form-caption">Whether this site has transferred content from an other (ex. SE) site. Will allow users to claim their content in the profile.</span>
85-
<%= select_tag :content_transfer, options_for_select([['yes', true], ['no', false]], selected: SiteSetting['AllowContentTransfer']),
86-
class: 'form-element' %>
87-
</div>
88-
89-
</div>
90-
</div>
91-
92-
<%= submit_tag 'Save and continue', class: 'button is-filled' %>
93-
1+
<h1>Create New Site</h1>
2+
3+
<p class="is-lead">Welcome to your new <%= @community.name %> community!</p>
4+
5+
<p>We are almost ready. We just need some more information to complete creation of the site.</p>
6+
7+
<p>Don't worry. You will be able to change all these things in the site settings later.</p>
8+
9+
<%= form_tag setup_save_url do %>
10+
11+
<div class="widget">
12+
<div class="widget--body">
13+
14+
<h2>Site Details</h2>
15+
16+
<div class="form-group">
17+
<%= label_tag :primary_color, 'Primary color', class: 'form-element' %>
18+
<span class="form-caption">Select a primary color for this site. Will be used as default for all categories.</span>
19+
<%= select_tag :primary_color, options_for_select(['turquoise', 'green', 'blue', 'darkblue', 'purple', 'gray', 'bluegray', 'yellow', 'orange', 'pink', 'red'],
20+
selected: SiteSetting['SiteCategoryHeaderDefaultColor']),
21+
class: 'form-element' %>
22+
</div>
23+
24+
<div class="form-group">
25+
<%= label_tag :logo_url, 'Site logo URL', class: 'form-element' %>
26+
<span class="form-caption">Choose a site logo for this site. Will be shown in the site header.</span>
27+
<%= text_field_tag :logo_url, SiteSetting['SiteLogoPath'], class: 'form-element' %>
28+
</div>
29+
30+
<div class="form-group">
31+
<%= label_tag :ad_slogan, 'Site Ad Slogan', class: 'form-element' %>
32+
<span class="form-caption">A slogan that will be shown in automatic community ads. See <a href="/ca">/ca</a> for more info.</span>
33+
<%= text_field_tag :ad_slogan, SiteSetting['SiteAdSlogan'], class: 'form-element' %>
34+
</div>
35+
36+
</div>
37+
</div>
38+
<div class="widget">
39+
<div class="widget--body">
40+
41+
<h2>Additional Features</h2>
42+
43+
<div class="form-group">
44+
<%= label_tag :mathjax, 'Enable MathJax', class: 'form-element' %>
45+
<span class="form-caption">MathJax is a library for rendering mathematic formulas. This will incur a small penalty in page loading time.</span>
46+
<%= select_tag :mathjax, options_for_select([['yes', true], ['no', false]], selected: SiteSetting['MathJaxEnabled']),
47+
class: 'form-element' %>
48+
</div>
49+
50+
<div class="form-group">
51+
<%= label_tag :syntax_highlighting, 'Enable Syntax Highlighting', class: 'form-element' %>
52+
<span class="form-caption">We support highlighting of code blocks using highlight.js. This will incur a small penalty in page loading time.</span>
53+
<%= select_tag :syntax_highlighting, options_for_select([['yes', true], ['no', false]], selected: SiteSetting['SyntaxHighlightingEnabled']),
54+
class: 'form-element' %>
55+
</div>
56+
57+
</div>
58+
</div>
59+
<div class="widget">
60+
<div class="widget--body">
61+
62+
<h2>Integrations</h2>
63+
64+
<div class="form-group">
65+
<%= label_tag :chat_link, 'Community chat link', class: 'form-element' %>
66+
<span class="form-caption">Link to a possible community chat. Can be kept empty if not needed.</span>
67+
<%= text_field_tag :chat_link, SiteSetting['ChatLink'], class: 'form-element' %>
68+
</div>
69+
70+
<div class="form-group">
71+
<%= label_tag :analytics_url, 'Analytics URL', class: 'form-element' %>
72+
<span class="form-caption">Full URL to a Matomo analytics instance, with leading protocol and trailing slash.</span>
73+
<%= text_field_tag :analytics_url, SiteSetting['AnalyticsURL'], class: 'form-element' %>
74+
</div>
75+
76+
<div class="form-group">
77+
<%= label_tag :analytics_id, 'Analytics Site ID', class: 'form-element' %>
78+
<span class="form-caption">Site ID for this community in your Matomo analytics instance.</span>
79+
<%= text_field_tag :analytics_id, SiteSetting['AnalyticsSiteId'], class: 'form-element' %>
80+
</div>
81+
82+
<div class="form-group">
83+
<%= label_tag :content_transfer, 'Has content transfer?', class: 'form-element' %>
84+
<span class="form-caption">Whether this site has transferred content from an other (ex. SE) site. Will allow users to claim their content in the profile.</span>
85+
<%= select_tag :content_transfer, options_for_select([['yes', true], ['no', false]], selected: SiteSetting['AllowContentTransfer']),
86+
class: 'form-element' %>
87+
</div>
88+
89+
</div>
90+
</div>
91+
92+
<%= submit_tag 'Save and continue', class: 'button is-filled' %>
93+
9494
<% end %>

app/views/categories/post_types.html.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<% header_title = @post_types.any? ? 'What kind of post?' : 'No allowed post types'
2-
header_subtitle = @post_types.any? \
3-
? 'This category has more than one type of post available. Pick a post type to get started.'
4-
: 'This category does not have any post types available.'
2+
header_subtitle = if @post_types.any?
3+
'This category has more than one type of post available. Pick a post type to get started.'
4+
else
5+
'This category does not have any post types available.'
6+
end
57
%>
68

79
<h1><%= header_title %></h1>

app/views/close_reasons/edit.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<% content_for :title, "Close Reasons" %>
1+
<% content_for :title, 'Close Reasons' %>
22

33
<h1>Edit close reason</h1>
44

app/views/close_reasons/new.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<% content_for :title, "Close Reasons" %>
1+
<% content_for :title, 'Close Reasons' %>
22

3-
<h1>Add <%= (params[:global] == "1") ? "global" : "" %> close reason</h1>
3+
<h1>Add <%= params[:global] == '1' ? 'global' : '' %> close reason</h1>
44

55
<% if @close_reason.errors.any? %>
66
<div class="notice is-danger">

app/views/comments/_reply_to_thread.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@
5858
post: thread.post_id,
5959
character_count: ".js-character-count-thread-reply-#{post.id}-#{thread.id}" } %>
6060
<%= render 'shared/char_count', type: "thread-reply-#{post.id}-#{thread.id}", min: min_chars, max: max_chars %>
61-
<%= submit_tag 'Add reply', class: 'button is-muted is-filled', disabled:true %>
61+
<%= submit_tag 'Add reply', class: 'button is-muted is-filled', disabled: true %>
6262
<% end %>
6363
<% end %>
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<h1>Resend confirmation instructions</h1>
22

33
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4-
<%= render "devise/shared/error_messages", resource: resource %>
4+
<%= render 'devise/shared/error_messages', resource: resource %>
55

66
<div class="form-group">
7-
<%= f.label :email, class: "form-element" %>
8-
<%= f.email_field :email, class: 'form-element', autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
7+
<%= f.label :email, class: 'form-element' %>
8+
<%= f.email_field :email, class: 'form-element', autofocus: true, autocomplete: 'email',
9+
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
910
</div>
1011

11-
<%= f.submit "Resend confirmation instructions", class: 'button is-filled is-very-large' %>
12+
<%= f.submit 'Resend confirmation instructions', class: 'button is-filled is-very-large' %>
1213
<% end %><br/>
1314

14-
<%= render "devise/shared/links" %>
15+
<%= render 'devise/shared/links' %>
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<h1>Change your password</h1>
22

33
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4-
<%= render "devise/shared/error_messages", resource: resource %>
4+
<%= render 'devise/shared/error_messages', resource: resource %>
55
<%= f.hidden_field :reset_password_token %>
66

77
<div class="form-group">
8-
<%= f.label :password, "New password", class: "form-element" %>
8+
<%= f.label :password, 'New password', class: 'form-element' %>
99
<% if @minimum_password_length %>
1010
<div class="form-caption">(<%= @minimum_password_length %> characters minimum)</div>
1111
<% end %>
12-
<%= f.password_field :password, class: 'form-element', autofocus: true, autocomplete: "new-password" %>
12+
<%= f.password_field :password, class: 'form-element', autofocus: true, autocomplete: 'new-password' %>
1313
</div>
1414

1515
<div class="form-group">
16-
<%= f.label :password_confirmation, "Confirm new password", class: "form-element" %><br />
17-
<%= f.password_field :password_confirmation, class: 'form-element', autocomplete: "new-password" %>
16+
<%= f.label :password_confirmation, 'Confirm new password', class: 'form-element' %><br />
17+
<%= f.password_field :password_confirmation, class: 'form-element', autocomplete: 'new-password' %>
1818
</div>
1919

20-
<%= f.submit "Change my password", class: 'button is-filled is-very-large' %>
20+
<%= f.submit 'Change my password', class: 'button is-filled is-very-large' %>
2121
<% end %><br/>
2222

23-
<%= render "devise/shared/links" %>
23+
<%= render 'devise/shared/links' %>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<h1>Forgot your password?</h1>
22

33
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4-
<%= render "devise/shared/error_messages", resource: resource %>
4+
<%= render 'devise/shared/error_messages', resource: resource %>
55

66
<div class="form-group">
7-
<%= f.label :email, class: "form-element" %>
8-
<%= f.email_field :email, class: 'form-element', autofocus: true, autocomplete: "email" %>
7+
<%= f.label :email, class: 'form-element' %>
8+
<%= f.email_field :email, class: 'form-element', autofocus: true, autocomplete: 'email' %>
99
</div>
1010

11-
<%= f.submit "Send me reset password instructions", class: 'button is-filled is-very-large' %>
11+
<%= f.submit 'Send me reset password instructions', class: 'button is-filled is-very-large' %>
1212
<% end %><br/>
1313

14-
<%= render "devise/shared/links" %>
14+
<%= render 'devise/shared/links' %>

0 commit comments

Comments
 (0)