Skip to content
Snippets Groups Projects
Commit bb1160eb authored by Alexandre Peres Arias's avatar Alexandre Peres Arias
Browse files

Merge branch 'master' into complaints

parents 298fd795 e105500a
No related branches found
No related tags found
No related merge requests found
Showing
with 3585 additions and 153 deletions
app/assets/images/logo_brasil.png

3.79 KiB

app/assets/images/logo_c3.png

6.34 KiB

app/assets/images/logo_fnde.jpg

55 KiB

app/assets/images/logo_ufpr.jpg

20 KiB

...@@ -3,4 +3,5 @@ $ -> ...@@ -3,4 +3,5 @@ $ ->
html: true html: true
content: -> content: ->
$('#collections_list_popover').html() $('#collections_list_popover').html()
return
\ No newline at end of file return
This diff is collapsed.
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
...@@ -41,6 +41,7 @@ h1, h2, h3, h4, h5, h6 { ...@@ -41,6 +41,7 @@ h1, h2, h3, h4, h5, h6 {
a, a:focus, a:hover { a, a:focus, a:hover {
font-weight: 400; font-weight: 400;
color: #000; color: #000;
text-decoration: none;
} }
.media-heading { .media-heading {
...@@ -305,7 +306,7 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; } ...@@ -305,7 +306,7 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; }
/* Alto Contraste*/ /* Alto Contraste*/
.contraste{ .contraste{
background-color: black !important; background-color: black !important;
color: white !important; color: white;
a{ a{
color: yellow; color: yellow;
} }
...@@ -327,18 +328,49 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; } ...@@ -327,18 +328,49 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; }
#subject-highlight{ #subject-highlight{
background-color: black !important; background-color: black !important;
} }
.field{
input{
color: black !important;
}
}
.actions{
input{
color: black !important;
}
}
.panel-wrapper{
background-color: black !important;
border: 2px solid white;
.btn{
background-color: black !important;
border: 5px solid white;
border-style: outset;
}
}
} }
.menu-bar-contrast{ .menu-bar-contrast{
background-color: black !important; background-color: black !important;
border-top: 2px solid white; border-top: 2px solid white;
border-bottom: 2px solid white; border-bottom: 2px solid white;
li{ li{
color: white !important;
a{ a{
color:white !important; color:white !important;
} }
a:hover{ a:hover{
background-color: #1E1E1E !important; background-color: #1E1E1E !important;
} }
a:active{
background-color: #1E1E1E !important;
}
a:focus{
background-color: #1E1E1E !important;
}
.caret{
border-top:7px white solid;
}
} }
.divider{ .divider{
background-color: white; background-color: white;
......
...@@ -14,11 +14,22 @@ $background-grey: #e7e7e8; ...@@ -14,11 +14,22 @@ $background-grey: #e7e7e8;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.author-label {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.learning-object-thumbnail { .learning-object-thumbnail {
min-width: 250px; min-width: 250px;
height: 141px; height: 141px;
position: relative; position: relative;
a > img {
width: 230px;
height: 141px;
}
.learning-object-actions { .learning-object-actions {
position: absolute; position: absolute;
bottom: 5px; bottom: 5px;
......
.panel-wrapper{
position: relative;
min-height: 500px;
min-width: 350px;
margin-top: 30px;
background-color: #2178F5;
color: white;
}
.divider{
height: 5px;
}
.general-highlights { .general-highlights {
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
...@@ -15,23 +26,19 @@ $carousel_size: 400px; ...@@ -15,23 +26,19 @@ $carousel_size: 400px;
.carousel { .carousel {
height: $carousel_size; height: $carousel_size;
h1{
background-color: rgba(37, 68, 32, 0.75);
}
#carrousel-new-description{
background-color: rgba(2, 8, 3, 0.75);
}
} }
.carousel h1 {
background-color: rgba(0, 0, 0, 0.75);
}
.carousel ol { .carousel ol {
background-color: rgba(0, 0, 0, 0.10); background-color: rgba(80, 80, 80, 0.7);
} }
.carousel-caption { .carousel-caption {
z-index: 10; z-index: 10;
margin-bottom: 2px !important;
padding-bottom: 0px !important;
width: 100%;
left: 0% !important;
background-image: linear-gradient(to top, rgba(80, 80, 80, 0.7), transparent);
} }
.carousel .item { .carousel .item {
...@@ -46,6 +53,12 @@ $carousel_size: 400px; ...@@ -46,6 +53,12 @@ $carousel_size: 400px;
height: 400px !important; height: 400px !important;
} }
.carousel-indicators{
left: 30% !important;
width: 100% !important;
margin-bottom: 0px;
bottom: 0px !important;
}
.carousel-indicators li { .carousel-indicators li {
display: inline-block; display: inline-block;
......
class Management::StatisticsController < ManagementController class Management::StatisticsController < ManagementController
def index def index
g = Gruff::Line.new
g.title = "Usuários"
g.data 'Estudantes', [0, 5, 8, 20]
g.data 'Professores', [0, 14,20, 40]
g.labels={
0 => '1',
1 => '3',
2 => '5',
3 => '7',
4 => '9'
}
g.theme = {
:colors => ['black', 'grey'],
:marker_color => 'grey',
:font_color => 'black',
:background_colors => 'transparent'
}
g.replace_colors(['green','yellow','black'])
g.marker_count = 1
g = Gruff::Line.new
g.title = "Downloads"
g.data 'downloads', [0, 5, 8, 20]
g.labels={
0 => '1',
1 => '3',
2 => '5',
3 => '7',
4 => '9'
}
g.theme = {
:colors => ['black', 'grey'],
:marker_color => 'grey',
:font_color => 'black',
:background_colors => 'transparent'
}
g.replace_colors(['green','yellow','black'])
g.marker_count = 1
g = Gruff::Line.new
g.title = "Coleções"
g.data 'colections', [0, 55, 153, 220]
g.labels={
0 => '1',
1 => '3',
2 => '5',
3 => '7',
4 => '9'
}
g.theme = {
:colors => ['black', 'grey'],
:marker_color => 'grey',
:font_color => 'black',
:background_colors => 'transparent'
}
g.replace_colors(['green','yellow','black'])
g.marker_count = 1
g.write("/home/alexandre/projetos/portalmec/app/assets/images/geral_colections.png")
g = Gruff::Line.new
g.title = "Acessos"
g.data 'accesses', [0, 415, 388, 320, 577 ]
g.labels={
0 => '1',
1 => '3',
2 => '5',
3 => '7',
4 => '9'
}
g.theme = {
:colors => ['black', 'grey'],
:marker_color => 'grey',
:font_color => 'black',
:background_colors => 'transparent'
}
g.replace_colors(['green','yellow','black'])
g.marker_count = 1
g.write("/home/alexandre/projetos/portalmec/app/assets/images/geral_accesses.png")
end end
def usuarios def usuarios
g = Gruff::Bar.new
g.title = "Usuários"
g.data 'Estudantes', 20
g.data 'Professores', 40
g.data 'Curadores', 6
g.data 'Moderadores', 3
g.data 'Administradores', 1
g.labels={
}
g.theme = {
:colors => ['black', 'grey'],
:marker_color => 'grey',
:font_color => 'black',
:background_colors => 'transparent'
}
g.replace_colors(['green','yellow','black','purple', 'blue'])
g.marker_count = 1
end end
def downloads def downloads
...@@ -119,30 +20,6 @@ class Management::StatisticsController < ManagementController ...@@ -119,30 +20,6 @@ class Management::StatisticsController < ManagementController
def collections def collections
g = Gruff::Pie.new
g.title = "Por área de atuação"
g.data 'Filosofia', 45
g.data 'Matemática', 92
g.data 'Língua Portuguesa', 78
g.data 'História', 57
g.data 'Física', 43
g.data 'Sociologia', 40
g.data 'Artes', 3
g.labels={
}
g.theme = {
:colors => ['black', 'grey'],
:marker_color => 'grey',
:font_color => 'black',
:background_colors => 'transparent'
}
g.replace_colors(['green','yellow','black','purple', 'blue', 'brown', 'red'])
g.marker_count = 1
g.write("/home/alexandre/projetos/portalmec/app/assets/images/colections.png")
end end
end end
class UsersController < ApplicationController class UsersController < ApplicationController
before_action :authenticate_user!, only: :me before_action :authenticate_user!, only: :me
before_action :check_current_user_page, only: :show before_action :check_current_user_page, only: :show
before_action :set_user, only: :show before_action :set_user, only: :show
...@@ -25,5 +26,7 @@ class UsersController < ApplicationController ...@@ -25,5 +26,7 @@ class UsersController < ApplicationController
redirect_to action: :me redirect_to action: :me
end end
end end
>>>>>>> master
end end
end end
...@@ -11,6 +11,8 @@ class WelcomeController < ApplicationController ...@@ -11,6 +11,8 @@ class WelcomeController < ApplicationController
learning_object_repository.find(id) learning_object_repository.find(id)
end end
@General = @General.take(3)
@Subjects = subject_repository.all @Subjects = subject_repository.all
@Subjects.delete_if{|s| not s.highlights.present?} @Subjects.delete_if{|s| not s.highlights.present?}
@Subjects = @Subjects.take(8) @Subjects = @Subjects.take(8)
......
...@@ -5,14 +5,14 @@ module LearningObjectsHelper ...@@ -5,14 +5,14 @@ module LearningObjectsHelper
end end
def learning_object_thumbnail(learning_object, size = "") def learning_object_thumbnail(learning_object, size = "")
if learning_object.thumbnail.nil? || learning_object.thumbnail == "thumbnai" # TODO: remove "thumbnai" when possible if learning_object.thumbnail.nil?
if size == "large" if size == "large"
image_tag('learning-object-preview-large.png') image_tag 'learning-object-preview-large.png', class: "thumbnail"
else else
image_tag('learning-object-preview.png') image_tag 'learning-object-preview.png', class: "thumbnail"
end end
else else
image_tag learning_object.thumbnail, alt: learning_object_title(learning_object) image_tag learning_object.thumbnail, alt: learning_object_title(learning_object), class: "thumbnail"
end end
end end
......
...@@ -38,6 +38,7 @@ class LearningObject ...@@ -38,6 +38,7 @@ class LearningObject
values values
end end
def get_bitstream_retrievelink_of name def get_bitstream_retrievelink_of name
values = @bitstreams.select { |v| v["bundleName"] == name } values = @bitstreams.select { |v| v["bundleName"] == name }
unless values.empty? unless values.empty?
...@@ -60,6 +61,7 @@ class LearningObject ...@@ -60,6 +61,7 @@ class LearningObject
get_bitstream_filename_of "ORIGINAL" get_bitstream_filename_of "ORIGINAL"
end end
private private
def defaults def defaults
......
class Subject class Subject
include ActiveModel::Model include ActiveModel::Model
attr_accessor :id, :created_at, :description, :highlights, :name attr_accessor :id, :created_at, :description, :highlights, :name, :learning_objects
def highlights def highlights
@highlights ||= subject_repository.get_highlights(self) @highlights ||= subject_repository.get_highlights(self)
end end
def learning_objects
@learning_objects ||= subject_repository.get_learning_objects(self)
end
def subject_repository def subject_repository
Portalmec::Application.repository.for :subject Portalmec::Application.repository.for :subject
end end
end end
\ No newline at end of file
...@@ -14,13 +14,16 @@ class OrientDb::Base ...@@ -14,13 +14,16 @@ class OrientDb::Base
build_object result build_object result
end end
def all def all
objects_hash = connection.query "SELECT FROM #{odb_class}", :limit => -1 objects_hash = connection.query "SELECT FROM #{odb_class}", :limit => -1
objects = build_objects(objects_hash) || [] objects = build_objects(objects_hash) || []
end end
def all_from_offset_to_limit(offset, limit) def all_from_offset_to_limit(offset, limit)
objects_hash = connection.query "SELECT FROM #{odb_class} LIMIT #{limit} SKIP #{offset}", :limit => limit objects_hash = connection.query "SELECT FROM #{odb_class} LIMIT #{limit} SKIP #{offset}", :limit => limit
objects = build_objects(objects_hash) || [] objects = build_objects(objects_hash) || []
end end
......
...@@ -15,6 +15,16 @@ module OrientDb ...@@ -15,6 +15,16 @@ module OrientDb
create_edge "Likes", user.rid, learning_object.id create_edge "Likes", user.rid, learning_object.id
end end
# Example:
# list = repository.for(:learning_objects).all
# list.each do |learning_object|
# learning_object.inspect <LearningObject model>
# end
def all
learning_objects_hash = connection.query "SELECT FROM LearningObject"
build_objects(learning_objects_hash) || []
end
# Usage: # Usage:
# learning_object = repository.for(:learning_objects).get_by_dspace_id 123 # learning_object = repository.for(:learning_objects).get_by_dspace_id 123
# #
......
...@@ -20,10 +20,10 @@ module OrientDb ...@@ -20,10 +20,10 @@ module OrientDb
return nil return nil
end end
#def update(id,operation,atributte,new) def update(id,operation,atributte,new)
# puts "update #{id} #{operation} #{atributte} = #{new}" puts "update #{id} #{operation} #{atributte} = #{new}"
# connection.command "update #{id} #{operation} #{atributte} = #{new}" connection.command "update #{id} #{operation} #{atributte} = #{new}"
#end end
private private
......
...@@ -12,10 +12,10 @@ module OrientDb ...@@ -12,10 +12,10 @@ module OrientDb
connection.command "DELETE VERTEX Subject where @rid = '#{id}'" connection.command "DELETE VERTEX Subject where @rid = '#{id}'"
end end
#def update(id, operation, atributte, new_value) def update(id, operation, atributte, new_value)
# puts "update #{id} #{operation} #{atributte} = #{new_value}" puts "update #{id} #{operation} #{atributte} = #{new_value}"
# connection.command "update #{id} #{operation} #{atributte} = #{new_value}" connection.command "update #{id} #{operation} #{atributte} = #{new_value}"
#end end
def get_learning_objects(subject) def get_learning_objects(subject)
result = get_edges_end("IsAbout", "in", subject.id) result = get_edges_end("IsAbout", "in", subject.id)
......
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