Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
68f0e814
Commit
68f0e814
authored
3 years ago
by
alexisben
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup static
parent
9d5c7d4d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models/communication/block/partner.rb
+8
-0
8 additions, 0 deletions
app/models/communication/block/partner.rb
app/views/admin/communication/blocks/templates/partners/_static.html.erb
+3
-13
3 additions, 13 deletions
.../communication/blocks/templates/partners/_static.html.erb
with
11 additions
and
13 deletions
app/models/communication/block/partner.rb
+
8
−
0
View file @
68f0e814
...
...
@@ -3,6 +3,14 @@ class Communication::Block::Partner < Communication::Block::Abstract
elements
.
each
do
|
partner
|
blob
=
find_blob
partner
,
'logo'
add_dependency
blob
unless
blob
.
nil?
# TODO : add organization dependency
# id = partner['id']
# next if id.blank?
# organization = university.organizations.find id
# next if organization.nil?
# add_dependency organization
# add_dependency organization.active_storage_blobs
end
end
end
This diff is collapsed.
Click to expand it.
app/views/admin/communication/blocks/templates/partners/_static.html.erb
+
3
−
13
View file @
68f0e814
<%
if
block
.
data
.
has_key?
(
'elements'
)
%>
<%
block
.
data
[
'elements'
].
each
do
|
partner
|
id
=
partner
[
'id'
]
if
id
!=
''
unless
id
.
nil?
unless
id
.
empty?
organization
=
block
.
university
.
organizations
.
find
id
%>
unless
id
.
blank?
organization
=
block
.
university
.
organizations
.
find
id
%>
- id: "
<%=
id
%>
"
name: >
<%=
prepare_text_for_static
organization
.
name
%>
url:
<%=
prepare_text_for_static
organization
.
url
%>
<%
if
organization
.
logo
.
attached?
%>
logo: "
<%=
organization
.
logo
.
blob
.
id
%>
"
<%
end
%>
<%
end
end
else
%>
<%
else
%>
- name: >
<%=
prepare_text_for_static
partner
[
'name'
]
%>
url: >-
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment