Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Harbor 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
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
3b1eda88
Commit
3b1eda88
authored
9 years ago
by
Matheus Agio Nerone
Browse files
Options
Downloads
Patches
Plain Diff
adding delete button
Signed-off-by:
man13
<
man13@inf.ufpr.br
>
parent
9829398b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/views/learning_objects/show.html.erb
+90
-82
90 additions, 82 deletions
app/views/learning_objects/show.html.erb
with
90 additions
and
82 deletions
app/views/learning_objects/show.html.erb
+
90
−
82
View file @
3b1eda88
<%
content_for
(
:body_attributes
)
do
%>
data-no-turbolink="true"
<%
end
%>
<%
if
@learning_object
.
state
==
'suspended'
%>
<h2>
Este conteúdo está suspenso!
</h2>
<h2>
Este conteúdo está suspenso!
</h2>
<%
end
%>
<div
class=
"row learning-object"
>
...
...
@@ -16,7 +16,7 @@
<br/><br/>
<h2
class=
"title"
>
<%=
learning_object_title
(
@learning_object
)
%>
</h2>
<%
unless
@learning_object
.
description
.
nil?
%>
<p
class=
"description"
>
<%=
@learning_object
.
description
%>
</p>
<p
class=
"description"
>
<%=
@learning_object
.
description
%>
</p>
<%
end
%>
<span
class=
"category"
>
<%=
(
"Em "
+
show_categories
(
@learning_object
.
categories
))
unless
@learning_object
.
categories
.
nil?
%>
</span>
</div>
...
...
@@ -26,27 +26,27 @@
<div
class=
"rightbar"
>
<%
author
=
@learning_object
.
get_metadata_value_of
(
"dc.contributor.author"
)
%>
<%
unless
author
.
blank?
%>
<div
class=
"media"
>
<div
class=
"media-left"
>
<a
href=
"#"
><img
class=
"user-image-small"
src=
"
<%#= current_user.avatar.url(:thumb) %>
<%=
asset_path
(
'user-anon.png'
)
%>
"
alt=
"Foto do usuário"
/></a>
</div>
<div
class=
"media-body"
>
<h5>
Autor
</h5>
<h3>
<%=
author
%>
</h3>
<div
class=
"media"
>
<div
class=
"media-left"
>
<a
href=
"#"
><img
class=
"user-image-small"
src=
"
<%#= current_user.avatar.url(:thumb) %>
<%=
asset_path
(
'user-anon.png'
)
%>
"
alt=
"Foto do usuário"
/></a>
</div>
<div
class=
"media-body"
>
<h5>
Autor
</h5>
<h3>
<%=
author
%>
</h3>
</div>
</div>
</div>
<%
end
%>
<%
unless
@learning_object
.
publisher
.
nil?
%>
<div
class=
"media"
>
<div
class=
"media-left"
>
<a
href=
"#"
><img
class=
"user-image-small"
src=
"
<%#= current_user.avatar.url(:thumb) %>
<%=
asset_path
(
'user-anon.png'
)
%>
"
alt=
"Foto do usuário"
/></a>
</div>
<div
class=
"media-body"
>
<%
publisher_type
=
@learning_object
.
publisher
.
class
%>
<h5>
<%=
publisher_type
==
User
?
'Adicionado por'
:
'Origem'
%>
</h5>
<h3
class=
"media-heading"
>
<%=
@learning_object
.
publisher
.
name
%>
</h3>
<div
class=
"media"
>
<div
class=
"media-left"
>
<a
href=
"#"
><img
class=
"user-image-small"
src=
"
<%#= current_user.avatar.url(:thumb) %>
<%=
asset_path
(
'user-anon.png'
)
%>
"
alt=
"Foto do usuário"
/></a>
</div>
<div
class=
"media-body"
>
<%
publisher_type
=
@learning_object
.
publisher
.
class
%>
<h5>
<%=
publisher_type
==
User
?
'Adicionado por'
:
'Origem'
%>
</h5>
<h3
class=
"media-heading"
>
<%=
@learning_object
.
publisher
.
name
%>
</h3>
</div>
</div>
</div>
<%
end
%>
<div
class=
"panel panel-default"
>
<h3>
Detalhes do Objeto
</h3>
...
...
@@ -59,56 +59,64 @@
</div>
<div
class=
"rating-panel"
>
<%
if
user_signed_in?
%>
<div
class=
"actions"
>
<div
class=
"action download"
>
<div
class=
"actions"
>
<div
class=
"action download"
>
<%=
link_to
download_learning_object_path
,
class:
'download btn btn-success'
,
target:
"_blank"
do
%>
<i
class=
"fa fa-download"
></i>
FAZER DOWNLOAD
<i
class=
"fa fa-download"
></i>
FAZER DOWNLOAD
<%
end
%>
</div>
<div
class=
"action"
>
<%=
link_to
like_learning_object_path
(
id:
@learning_object
.
id
),
class:
'vote btn btn-primary'
,
method: :post
,
remote:
true
do
%>
<%
if
@liked
%>
<%=
image_tag
"icons/btn_like_down.png"
,
alt:
"Descurtir"
%>
<%
else
%>
<%=
image_tag
"icons/btn_like_up.png"
,
alt:
"Curtir"
%>
<%
end
%>
</div>
<div
class=
"action"
>
<%=
link_to
like_learning_object_path
(
id:
@learning_object
.
id
),
class:
'vote btn btn-primary'
,
method: :post
,
remote:
true
do
%>
<%
if
@liked
%>
<%=
image_tag
"icons/btn_like_down.png"
,
alt:
"Descurtir"
%>
<%
else
%>
<%=
image_tag
"icons/btn_like_up.png"
,
alt:
"Curtir"
%>
<%
end
%>
<%
end
%>
</div>
<div
class=
"action"
>
<a
tabindex=
"0"
class=
"add-to-collection btn btn-primary"
role=
"button"
title=
"Adicionar as coleções"
data-loid=
"
<%=
@learning_object
.
id
%>
"
>
<%=
image_tag
"icons/btn_add.png"
,
alt:
"Adicionar à coleção"
%>
</a>
</div>
<div
class=
"action"
>
<%=
link_to
bookmark_add_path
(
id:
@learning_object
.
id
,
type:
@learning_object
.
class
.
to_s
),
class
:"btn btn-primary bookmark"
,
title:
"Adicionar aos favoritos"
,
method: :post
,
remote:
true
do
%>
<i
class=
"fa fa-bookmark"
></i>
<%
end
%>
</div>
<div
class=
"action"
>
<%=
render
'complaints/complaints_button'
%>
</div>
<div
class=
"action"
>
<a
tabindex=
"1"
class=
"btn btn-primary share"
role=
"button"
title=
"Compartilhar"
data-toggle=
"modal"
data-target=
"#share_modal"
>
<i
class=
"fa fa-share"
></i>
<%#= image_tag "icons/collection-add.png", alt: "Compartilhar" %>
</a>
<%=
render
'share_modal'
%>
</div>
<%
if
policy
(
@learning_object
).
update?
%>
<div
class=
"action"
>
<a
tabindex=
"1"
class=
"btn btn-primary share"
role=
"button"
title=
"Editar conteúdo"
href=
"
<%=
edit_learning_object_path
(
@learning_object
)
%>
"
>
<i
class=
"fa fa-pencil"
></i>
</a>
</div>
<%
end
%>
</div>
<div
class=
"action"
>
<a
tabindex=
"0"
class=
"add-to-collection btn btn-primary"
role=
"button"
title=
"Adicionar as coleções"
data-loid=
"
<%=
@learning_object
.
id
%>
"
>
<%=
image_tag
"icons/btn_add.png"
,
alt:
"Adicionar à coleção"
%>
</a>
</div>
<div
class=
"action"
>
<%=
link_to
bookmark_add_path
(
id:
@learning_object
.
id
,
type:
@learning_object
.
class
.
to_s
),
class
:"btn btn-primary bookmark"
,
title:
"Adicionar aos favoritos"
,
method: :post
,
remote:
true
do
%>
<i
class=
"fa fa-bookmark"
></i>
<%
end
%>
</div>
<div
class=
"action"
>
<%=
render
'complaints/complaints_button'
%>
</div>
<div
class=
"action"
>
<a
tabindex=
"1"
class=
"btn btn-primary share"
role=
"button"
title=
"Compartilhar"
data-toggle=
"modal"
data-target=
"#share_modal"
>
<i
class=
"fa fa-share"
></i>
<%#= image_tag "icons/collection-add.png", alt: "Compartilhar" %>
</a>
<%=
render
'share_modal'
%>
</div>
<%
if
policy
(
@learning_object
).
update
?
%>
<div
class=
"action"
>
<a
tabindex=
"1"
class=
"btn btn-primary share"
role=
"button"
title=
"
Edi
tar conteúdo"
href=
"
<%=
edit_
learning_object_path
(
@learning_object
)
%>
"
>
<i
class=
"fa fa-
pencil
"
></i>
</a>
</div>
<%
end
%>
<%
if
policy
(
@learning_object
).
destroy
?
%>
<div
class=
"action"
>
<a
tabindex=
"1"
data-method=
'delete'
class=
"btn btn-primary share"
role=
"button"
title=
"
Dele
tar conteúdo"
href=
"
<%=
learning_object_path
(
@learning_object
)
%>
"
>
<i
class=
"fa fa-
trash
"
></i>
</a>
</div>
<%
end
%>
</div>
</div>
<%
else
%>
<div
class=
"login-info"
>
<%=
image_tag
"icons/i_estilizado.png"
%>
<h4>
Logue-se para poder curtir, adicionar o objeto em uma coleção, baixar o counteúdo ou denunciar.
</h4>
</div>
<div
class=
"login-info"
>
<%=
image_tag
"icons/i_estilizado.png"
%>
<h4>
Logue-se para poder curtir, adicionar o objeto em uma coleção, baixar o counteúdo ou denunciar.
</h4>
</div>
<%
end
%>
</div>
</div>
...
...
@@ -124,33 +132,33 @@
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Fechar"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
id=
"extra_metadata_modal_label"
>
Metadados Adicionais
</h4>
</div>
<div
class=
"modal-body"
style=
"text-align:justify"
>
<div
class=
"modal-body"
style=
"text-align:justify"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<ul>
<li><b>
Autor:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.contributor.author"
)
%>
</li>
<li><b>
Tipo:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.type"
)
%>
</li>
<li><b>
Data:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.date.available"
)
%>
</li>
<li><b>
Linguagem:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.language"
)
%>
</li>
</ul>
<table
class=
"table table-striped"
>
<%
@learning_object
.
metadata
.
each
do
|
m
|
%>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<ul>
<li><b>
Autor:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.contributor.author"
)
%>
</li>
<li><b>
Tipo:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.type"
)
%>
</li>
<li><b>
Data:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.date.available"
)
%>
</li>
<li><b>
Linguagem:
</b>
<%=
@learning_object
.
get_metadata_value_of
(
"dc.language"
)
%>
</li>
</ul>
<table
class=
"table table-striped"
>
<%
@learning_object
.
metadata
.
each
do
|
m
|
%>
<tr>
<th><span>
<%=
"
#{
m
[
"key"
]
}
:"
%>
</span></th>
<td>
<%=
"
#{
m
[
"value"
]
}
"
%>
</td>
</tr>
<%
end
%>
</table>
</div>
<%
end
%>
</table>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Fechar
</button>
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Fechar
</button>
</div>
</div>
</div>
</div>
...
...
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