@@ -98,7 +98,7 @@
el.find(".total-week").text('+' + data.week_count);
el.find(".total-month").text('+' + data.month_count);
}
-
+
var models = ['user', 'topic', 'reply', 'notification', 'photo', 'comment'];
for (var i = 0; i < models.length; i ++) {
var model = models[i];
diff --git a/app/views/admin/locations/index.html.erb b/app/views/admin/locations/index.html.erb
index 348b9f076f..4aaa9e0a25 100644
--- a/app/views/admin/locations/index.html.erb
+++ b/app/views/admin/locations/index.html.erb
@@ -1,5 +1,4 @@
<%= render 'base' %>
-
@@ -9,14 +8,14 @@
|
<% @locations.each do |item| %>
- ">
- <%= item.id %> |
- <%= item.name %> |
- <%= item.users_count %> |
-
- <%= link_to "", edit_admin_location_path(item.id), class: "fa fa-edit" %>
- |
-
+ ">
+ <%= item.id %> |
+ <%= item.name %> |
+ <%= item.users_count %> |
+
+ <%= link_to "", edit_admin_location_path(item.id), class: "fa fa-edit" %>
+ |
+
<% end %>
<%= paginate @locations %>
diff --git a/app/views/admin/nodes/_form.html.erb b/app/views/admin/nodes/_form.html.erb
index 7dbb2aa0f2..aa937380f7 100644
--- a/app/views/admin/nodes/_form.html.erb
+++ b/app/views/admin/nodes/_form.html.erb
@@ -1,23 +1,19 @@
<%= form_for [:admin,@node] do |f| %>
<%= render 'shared/error_messages', target: @node %>
-
<%= f.label :name %>
<%= f.text_field :name, class: "form-control" %>
-
<%= f.label :sort %>
<%= f.text_field :sort, class: "form-control" %>
-
<%= f.label :summary %>
<%= f.text_area :summary, class: "form-control" %>
-
<%= f.submit t("common.save"), class: "btn btn-primary", 'data-disable-with' => t("common.saving") %>
- <%= link_to 'Back', admin_nodes_path %>
+ <%= link_to t("common.cancel"), admin_nodes_path, class: "btn btn-secondary" %>
<% end %>
diff --git a/app/views/admin/nodes/index.html.erb b/app/views/admin/nodes/index.html.erb
index f8f9489424..1caf4e75ea 100644
--- a/app/views/admin/nodes/index.html.erb
+++ b/app/views/admin/nodes/index.html.erb
@@ -1,11 +1,9 @@
<% content_for :sitemap do %>
<%= t("admin.menu.nodes")%>
<% end %>
-
- <%= link_to t("admin.nodes.new"), new_admin_node_path, class: "btn btn-default" %>
+ <%= link_to t("admin.nodes.new"), new_admin_node_path, class: "btn btn-secondary" %>
-
# |
@@ -14,15 +12,14 @@
Topics Count |
|
-
-<% @nodes.each do |node| %>
-
- <%= node.id %> |
- <%= link_to node.name, node_topics_path(node.id) %> |
- <%= node.sort %> |
- <%= node.topics_count %> |
- <%= link_to '', edit_admin_node_path(node), class: "fa fa-edit" %>
- <%= link_to '', admin_node_path(node), 'data-confirm' => 'Are you sure?' , method: :delete, class: "fa fa-trash" %> |
-
-<% end %>
+ <% @nodes.each do |node| %>
+
+ <%= node.id %> |
+ <%= link_to node.name, node_topics_path(node.id) %> |
+ <%= node.sort %> |
+ <%= node.topics_count %> |
+ <%= link_to '', edit_admin_node_path(node), class: "fa fa-edit" %>
+ <%= link_to '', admin_node_path(node), 'data-confirm' => 'Are you sure?' , method: :delete, class: "fa fa-trash" %> |
+
+ <% end %>
diff --git a/app/views/admin/photos/index.html.erb b/app/views/admin/photos/index.html.erb
index 65d9afe0e4..0e598e8c8f 100644
--- a/app/views/admin/photos/index.html.erb
+++ b/app/views/admin/photos/index.html.erb
@@ -1,27 +1,28 @@
<% content_for :sitemap do %>
-
<%= t('admin.menu.photos') %>
+
+ <%= t('admin.menu.photos') %>
+
<% end %>
-
-
<% @photos.each do |photo| %>
-
<%= link_to image_tag(photo.image.url(:md)), photo.image.url, target: "_blank" if !photo[:image].blank? %>
+
+ <%= link_to image_tag(photo.image.url(:md)), photo.image.url, target: "_blank" if !photo[:image].blank? %>
+
<% if photo.user %>
<%= link_to photo.user&.login, edit_admin_user_path(photo.user_id), target: "_blank" %>
<% end %>
- <%= link_to icon_tag("trash", label: "Delete"), admin_photo_path(photo), 'data-confirm' => 'Are you sure?', method: :delete, remote: true, class: "btn btn-default btn-sm btn-block" %>
+ <%= link_to icon_tag("trash", label: "Delete" ), admin_photo_path(photo), 'data-confirm'=> 'Are you sure?',
+ method: :delete, remote: true, class: "btn btn-secondary btn-sm btn-block" %>
<% end %>
diff --git a/app/views/admin/plugins/index.html.erb b/app/views/admin/plugins/index.html.erb
index 06d0380807..68308d6337 100644
--- a/app/views/admin/plugins/index.html.erb
+++ b/app/views/admin/plugins/index.html.erb
@@ -3,8 +3,8 @@
<%= link_to "Install...", new_admin_plugin_path, class: "btn btn-primary" %>
- <%= link_to "Find plugins", "https://github.com/topics/homeland-plugin", class: "btn btn-default", target: "_blank" %>
- <%= link_to "Navbar order...", edit_admin_site_config_path("sorted_plugins"), class: "btn btn-default pull-right" %>
+ <%= link_to "Find plugins", "https://github.com/topics/homeland-plugin", class: "btn btn-secondary", target: "_blank" %>
+ <%= link_to "Navbar order...", edit_admin_site_config_path("sorted_plugins"), class: "btn btn-secondary pull-right" %>
<% Homeland.plugins.each do |plugin| %>
@@ -15,7 +15,7 @@
<%= plugin.version %>
<% if plugin.uninstallable? %>
- <%= link_to "Uninstall", admin_plugin_path(plugin.name), data: { method: :delete, confirm: "Are you sure to uninstall this Plugin?", confirm_with: "Uninstalling..." }, class: "btn btn-default btn-sm pull-right" %>
+ <%= link_to "Uninstall", admin_plugin_path(plugin.name), data: { method: :delete, confirm: "Are you sure to uninstall this Plugin?", confirm_with: "Uninstalling..." }, class: "btn btn-secondary btn-sm pull-right" %>
<% end %>
<% end %>
diff --git a/app/views/admin/plugins/new.html.erb b/app/views/admin/plugins/new.html.erb
index 8cb16c393c..58a55aa40e 100644
--- a/app/views/admin/plugins/new.html.erb
+++ b/app/views/admin/plugins/new.html.erb
@@ -1,8 +1,8 @@
<%= form_for User.new, url: admin_plugins_path, method: :post, html: { enctype: "multipart/form-data" } do |f| %>