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 @@ $ ->
html: true
content: ->
$('#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 {
a, a:focus, a:hover {
font-weight: 400;
color: #000;
text-decoration: none;
}
.media-heading {
......@@ -305,7 +306,7 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; }
/* Alto Contraste*/
.contraste{
background-color: black !important;
color: white !important;
color: white;
a{
color: yellow;
}
......@@ -327,18 +328,49 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; }
#subject-highlight{
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{
background-color: black !important;
border-top: 2px solid white;
border-bottom: 2px solid white;
li{
color: white !important;
a{
color:white !important;
}
a:hover{
background-color: #1E1E1E !important;
}
a:active{
background-color: #1E1E1E !important;
}
a:focus{
background-color: #1E1E1E !important;
}
.caret{
border-top:7px white solid;
}
}
.divider{
background-color: white;
......
......@@ -14,11 +14,22 @@ $background-grey: #e7e7e8;
text-overflow: ellipsis;
}
.author-label {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.learning-object-thumbnail {
min-width: 250px;
height: 141px;
position: relative;
a > img {
width: 230px;
height: 141px;
}
.learning-object-actions {
position: absolute;
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 {
padding-left: 0px;
padding-right: 0px;
......@@ -15,23 +26,19 @@ $carousel_size: 400px;
.carousel {
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 {
background-color: rgba(0, 0, 0, 0.10);
background-color: rgba(80, 80, 80, 0.7);
}
.carousel-caption {
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 {
......@@ -46,6 +53,12 @@ $carousel_size: 400px;
height: 400px !important;
}
.carousel-indicators{
left: 30% !important;
width: 100% !important;
margin-bottom: 0px;
bottom: 0px !important;
}
.carousel-indicators li {
display: inline-block;
......
class Management::StatisticsController < ManagementController
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
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
def downloads
......@@ -119,30 +20,6 @@ class Management::StatisticsController < ManagementController
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
class UsersController < ApplicationController
before_action :authenticate_user!, only: :me
before_action :check_current_user_page, only: :show
before_action :set_user, only: :show
......@@ -25,5 +26,7 @@ class UsersController < ApplicationController
redirect_to action: :me
end
end
>>>>>>> master
end
end
......@@ -11,6 +11,8 @@ class WelcomeController < ApplicationController
learning_object_repository.find(id)
end
@General = @General.take(3)
@Subjects = subject_repository.all
@Subjects.delete_if{|s| not s.highlights.present?}
@Subjects = @Subjects.take(8)
......
......@@ -5,14 +5,14 @@ module LearningObjectsHelper
end
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"
image_tag('learning-object-preview-large.png')
image_tag 'learning-object-preview-large.png', class: "thumbnail"
else
image_tag('learning-object-preview.png')
image_tag 'learning-object-preview.png', class: "thumbnail"
end
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
......
......@@ -38,6 +38,7 @@ class LearningObject
values
end
def get_bitstream_retrievelink_of name
values = @bitstreams.select { |v| v["bundleName"] == name }
unless values.empty?
......@@ -60,6 +61,7 @@ class LearningObject
get_bitstream_filename_of "ORIGINAL"
end
private
def defaults
......
class Subject
include ActiveModel::Model
attr_accessor :id, :created_at, :description, :highlights, :name
attr_accessor :id, :created_at, :description, :highlights, :name, :learning_objects
def highlights
@highlights ||= subject_repository.get_highlights(self)
end
def learning_objects
@learning_objects ||= subject_repository.get_learning_objects(self)
end
def subject_repository
Portalmec::Application.repository.for :subject
end
end
\ No newline at end of file
end
......@@ -14,13 +14,16 @@ class OrientDb::Base
build_object result
end
def all
objects_hash = connection.query "SELECT FROM #{odb_class}", :limit => -1
objects = build_objects(objects_hash) || []
end
def all_from_offset_to_limit(offset, limit)
objects_hash = connection.query "SELECT FROM #{odb_class} LIMIT #{limit} SKIP #{offset}", :limit => limit
objects = build_objects(objects_hash) || []
end
......
......@@ -15,6 +15,16 @@ module OrientDb
create_edge "Likes", user.rid, learning_object.id
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:
# learning_object = repository.for(:learning_objects).get_by_dspace_id 123
#
......
......@@ -20,10 +20,10 @@ module OrientDb
return nil
end
#def update(id,operation,atributte,new)
# puts "update #{id} #{operation} #{atributte} = #{new}"
# connection.command "update #{id} #{operation} #{atributte} = #{new}"
#end
def update(id,operation,atributte,new)
puts "update #{id} #{operation} #{atributte} = #{new}"
connection.command "update #{id} #{operation} #{atributte} = #{new}"
end
private
......
......@@ -12,10 +12,10 @@ module OrientDb
connection.command "DELETE VERTEX Subject where @rid = '#{id}'"
end
#def update(id, operation, atributte, new_value)
# puts "update #{id} #{operation} #{atributte} = #{new_value}"
# connection.command "update #{id} #{operation} #{atributte} = #{new_value}"
#end
def update(id, operation, atributte, new_value)
puts "update #{id} #{operation} #{atributte} = #{new_value}"
connection.command "update #{id} #{operation} #{atributte} = #{new_value}"
end
def get_learning_objects(subject)
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