Skip to content
Snippets Groups Projects
Commit 7c81d8f6 authored by pabois's avatar pabois
Browse files

add logo in university

parent 0fcd9068
No related branches found
No related tags found
No related merge requests found
@import 'appstack/light'
@import 'admin/*'
......@@ -57,6 +57,6 @@ class Server::UniversitiesController < Server::ApplicationController
end
def university_params
params.require(:university).permit(:name, :address, :zipcode, :city, :country, :private, :identifier)
params.require(:university).permit(:name, :address, :zipcode, :city, :country, :private, :identifier, :logo, :logo_delete)
end
end
......@@ -19,11 +19,13 @@ class University < ApplicationRecord
validates_presence_of :name
scope :ordered, -> { order(:name) }
include WithIdentifier
include WithUsers
include WithCommunication
include WithEducation
include WithIdentifier
include WithResearch
include WithCommunication
include WithUsers
has_one_attached_deletable :logo
def to_s
"#{name}"
......
......@@ -4,7 +4,7 @@ module User::WithRoles
included do
attr_accessor :modified_by
enum role: { visitor: 0, admin: 20, superadmin: 30 }
enum role: { visitor: 0, admin: 20, server_admin: 30 }
scope :for_role, -> (role) { where(role: role) }
......
......@@ -8,7 +8,7 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500&display=swap" rel="stylesheet">
<%= stylesheet_link_tag 'adminserver', media: 'all' %>
<%= stylesheet_link_tag 'admin', media: 'all' %>
<%= favicon_link_tag 'favicon.png' %>
</head>
......
......@@ -5,7 +5,7 @@
<%= f.input :identifier %>
<%= f.input :private %>
</div>
<div class="col-md-8">
<div class="col-md-4">
<%= f.input :address %>
<div class="row">
<div class="col-md-4">
......@@ -17,6 +17,13 @@
</div>
<%= f.input :country %>
</div>
<div class="col-md-4">
<%= f.input :logo,
as: :single_deletable_file,
input_html: { accept: '.jpg,.jpeg,.png,.svg' },
preview: 200,
direct_upload: true %>
</div>
</div>
<% content_for :buttons do %>
<%= submit f %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment