summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2011-08-31 13:23:23 +0200
committergebele <gebele@in-silico.ch>2011-08-31 13:23:23 +0200
commit16eed270e0e7da70bc2d953434626b88cb6633c0 (patch)
treef36dcc5fdbf627f9ca13c100b89e3fffdd0e9a96
parentcdb6fef0c16f9959eefa287fa924bbd4216b81f8 (diff)
parentc6e75e0028c8e3d45a236b8d79f3c0d15092da61 (diff)
Merge branch 'development' into feature/policy
-rw-r--r--application.rb1
-rw-r--r--public/arrow_down.pngbin0 -> 411 bytes
-rw-r--r--public/arrow_up.pngbin0 -> 394 bytes
-rw-r--r--views/models.haml3
-rw-r--r--views/models_navigation.haml6
-rw-r--r--views/style.sass2
6 files changed, 6 insertions, 6 deletions
diff --git a/application.rb b/application.rb
index 55a8eb6..effac92 100644
--- a/application.rb
+++ b/application.rb
@@ -108,6 +108,7 @@ get '/models/?' do
@models = ToxCreateModel.all.sort(:order => "DESC") unless @models
@models.each{|m| raise "internal redis error: model is nil" unless m}
+ @models.delete_if{|m| !is_authorized(m.web_uri, "GET")}
haml :models, :locals=>{:models=>@models}
end
diff --git a/public/arrow_down.png b/public/arrow_down.png
new file mode 100644
index 0000000..d298656
--- /dev/null
+++ b/public/arrow_down.png
Binary files differ
diff --git a/public/arrow_up.png b/public/arrow_up.png
new file mode 100644
index 0000000..70417dc
--- /dev/null
+++ b/public/arrow_up.png
Binary files differ
diff --git a/views/models.haml b/views/models.haml
index 6a181df..1419e37 100644
--- a/views/models.haml
+++ b/views/models.haml
@@ -17,11 +17,10 @@
= haml :regression, :layout => false
= haml :similarity, :layout => false
= haml :significant_fragments, :layout => false
--# - if is_authorized(model.web_uri, "GET")
- first = 5*@page
- last = first+4
-= models_navigation
+= models_navigation if @models.size > 1
- if @models[first..last]
- @models[first..last].each do |model|
= haml :model, :locals=>{:model=>model}, :layout => false
diff --git a/views/models_navigation.haml b/views/models_navigation.haml
index fa5bd31..d324fce 100644
--- a/views/models_navigation.haml
+++ b/views/models_navigation.haml
@@ -13,9 +13,11 @@
%div{:id => idname, :class => "active"}
%span="#{idname}"
- if params[:order] == "ASC"
- #up{:class => "link"}= "&dArr;"
+ #up{:class => "link"}
+ %img{:src => "arrow_down.png", :alt => 'in ascending order', :title => 'in ascending order'}/
- else
- #down{:class => "link"}= "&uArr;"
+ #down{:class => "link"}
+ %img{:src => "arrow_up.png", :alt => 'in descending order', :title => 'in descending order'}/
- else
%div{:id => idname, :class => "link"}="#{idname}"
|
diff --git a/views/style.sass b/views/style.sass
index 0052d79..96cb3b0 100644
--- a/views/style.sass
+++ b/views/style.sass
@@ -314,5 +314,3 @@ dl
padding: 0 1px
.thin
font-weight: 100
- span
- text-decoration: underline