Merge branch 'master' of bitbucket.org:signum/debshots
Conflicts: debshots.komodoproject
This commit is contained in:
commit
93177ab578
10 changed files with 139 additions and 59 deletions
8
Gemfile
8
Gemfile
|
|
@ -16,7 +16,7 @@ gem 'uglifier', '>= 1.3.0'
|
||||||
gem 'coffee-rails', '~> 4.0.0'
|
gem 'coffee-rails', '~> 4.0.0'
|
||||||
|
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
# gem 'therubyracer', platforms: :ruby
|
gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
|
|
@ -56,8 +56,10 @@ group :development do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Twitter Bootstrap template
|
# Twitter Bootstrap template
|
||||||
gem 'bootstrap-sass'
|
#gem 'bootstrap-sass'
|
||||||
|
#gem 'anjlab-bootstrap-rails', '>= 3.0.0.0'
|
||||||
|
gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
|
||||||
|
:github => 'anjlab/bootstrap-rails'
|
||||||
# Pagination
|
# Pagination
|
||||||
# Hint: rails generate kaminari:views bootstrap
|
# Hint: rails generate kaminari:views bootstrap
|
||||||
gem 'kaminari'
|
gem 'kaminari'
|
||||||
|
|
|
||||||
37
Gemfile.lock
37
Gemfile.lock
|
|
@ -1,3 +1,11 @@
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/anjlab/bootstrap-rails.git
|
||||||
|
revision: 056c63f1128a255688da1d064c5a2854ab5c8a9a
|
||||||
|
specs:
|
||||||
|
anjlab-bootstrap-rails (3.0.0.1)
|
||||||
|
railties (>= 3.0)
|
||||||
|
sass (>= 3.2)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
|
@ -26,14 +34,12 @@ GEM
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
tzinfo (~> 0.3.37)
|
tzinfo (~> 0.3.37)
|
||||||
arel (4.0.0)
|
arel (4.0.0)
|
||||||
atomic (1.1.10)
|
atomic (1.1.13)
|
||||||
better_errors (0.9.0)
|
better_errors (0.9.0)
|
||||||
coderay (>= 1.0.0)
|
coderay (>= 1.0.0)
|
||||||
erubis (>= 2.6.6)
|
erubis (>= 2.6.6)
|
||||||
binding_of_caller (0.7.2)
|
binding_of_caller (0.7.2)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
bootstrap-sass (2.3.2.1)
|
|
||||||
sass (~> 3.2)
|
|
||||||
builder (3.1.4)
|
builder (3.1.4)
|
||||||
callsite (0.0.11)
|
callsite (0.0.11)
|
||||||
coderay (1.0.9)
|
coderay (1.0.9)
|
||||||
|
|
@ -46,13 +52,12 @@ GEM
|
||||||
coffee-script-source (1.6.3)
|
coffee-script-source (1.6.3)
|
||||||
debug_inspector (0.0.2)
|
debug_inspector (0.0.2)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (1.4.0)
|
execjs (2.0.0)
|
||||||
multi_json (~> 1.0)
|
|
||||||
fancybox2-rails (0.2.4)
|
fancybox2-rails (0.2.4)
|
||||||
railties (>= 3.1.0)
|
railties (>= 3.1.0)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
i18n (0.6.4)
|
i18n (0.6.5)
|
||||||
jbuilder (1.4.2)
|
jbuilder (1.5.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
multi_json (>= 1.2.0)
|
multi_json (>= 1.2.0)
|
||||||
jquery-rails (3.0.4)
|
jquery-rails (3.0.4)
|
||||||
|
|
@ -62,6 +67,7 @@ GEM
|
||||||
kaminari (0.14.1)
|
kaminari (0.14.1)
|
||||||
actionpack (>= 3.0.0)
|
actionpack (>= 3.0.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
|
libv8 (3.16.14.3)
|
||||||
mail (2.5.4)
|
mail (2.5.4)
|
||||||
mime-types (~> 1.16)
|
mime-types (~> 1.16)
|
||||||
treetop (~> 1.4.8)
|
treetop (~> 1.4.8)
|
||||||
|
|
@ -69,9 +75,9 @@ GEM
|
||||||
callsite
|
callsite
|
||||||
rack-contrib
|
rack-contrib
|
||||||
railties
|
railties
|
||||||
mime-types (1.23)
|
mime-types (1.24)
|
||||||
minitest (4.7.5)
|
minitest (4.7.5)
|
||||||
multi_json (1.7.7)
|
multi_json (1.7.9)
|
||||||
pg (0.16.0)
|
pg (0.16.0)
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
rack (1.5.2)
|
rack (1.5.2)
|
||||||
|
|
@ -95,7 +101,8 @@ GEM
|
||||||
rake (10.1.0)
|
rake (10.1.0)
|
||||||
rdoc (3.12.2)
|
rdoc (3.12.2)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
sass (3.2.9)
|
ref (1.0.5)
|
||||||
|
sass (3.2.10)
|
||||||
sass-rails (4.0.0)
|
sass-rails (4.0.0)
|
||||||
railties (>= 4.0.0.beta, < 5.0)
|
railties (>= 4.0.0.beta, < 5.0)
|
||||||
sass (>= 3.1.10)
|
sass (>= 3.1.10)
|
||||||
|
|
@ -112,12 +119,15 @@ GEM
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
sprockets (~> 2.8)
|
sprockets (~> 2.8)
|
||||||
sqlite3 (1.3.7)
|
sqlite3 (1.3.8)
|
||||||
|
therubyracer (0.12.0)
|
||||||
|
libv8 (~> 3.16.14.0)
|
||||||
|
ref
|
||||||
thor (0.18.1)
|
thor (0.18.1)
|
||||||
thread_safe (0.1.2)
|
thread_safe (0.1.2)
|
||||||
atomic
|
atomic
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
treetop (1.4.14)
|
treetop (1.4.15)
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
turbolinks (1.3.0)
|
turbolinks (1.3.0)
|
||||||
|
|
@ -131,9 +141,9 @@ PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
anjlab-bootstrap-rails!
|
||||||
better_errors
|
better_errors
|
||||||
binding_of_caller
|
binding_of_caller
|
||||||
bootstrap-sass
|
|
||||||
coffee-rails (~> 4.0.0)
|
coffee-rails (~> 4.0.0)
|
||||||
fancybox2-rails (~> 0.2.4)
|
fancybox2-rails (~> 0.2.4)
|
||||||
jbuilder (~> 1.2)
|
jbuilder (~> 1.2)
|
||||||
|
|
@ -145,5 +155,6 @@ DEPENDENCIES
|
||||||
sass-rails (~> 4.0.0)
|
sass-rails (~> 4.0.0)
|
||||||
sdoc
|
sdoc
|
||||||
sqlite3
|
sqlite3
|
||||||
|
therubyracer
|
||||||
turbolinks
|
turbolinks
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,5 @@
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require fancybox
|
//= require fancybox
|
||||||
//= require turbolinks
|
//= require turbolinks
|
||||||
|
//= require twitter/bootstrap
|
||||||
//= require_tree .
|
//= require_tree .
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
/*
|
|
||||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
||||||
* listed below.
|
|
||||||
*
|
|
||||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
||||||
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
|
||||||
*
|
|
||||||
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
|
||||||
* compiled file, but it's generally better to create a new file per style scope.
|
|
||||||
*
|
|
||||||
*= require_self
|
|
||||||
*= require_tree .
|
|
||||||
*= require fancybox
|
|
||||||
*/
|
|
||||||
|
|
||||||
//= require bootstrap
|
|
||||||
|
|
@ -1,2 +1,16 @@
|
||||||
@import 'bootstrap';
|
/*
|
||||||
@import 'bootstrap-responsive';
|
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||||
|
* listed below.
|
||||||
|
*
|
||||||
|
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||||
|
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
||||||
|
*
|
||||||
|
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
||||||
|
* compiled file, but it's generally better to create a new file per style scope.
|
||||||
|
*
|
||||||
|
*= require_self
|
||||||
|
*= require_tree .
|
||||||
|
*= require fancybox
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import "twitter/bootstrap";
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class Package < ActiveRecord::Base
|
||||||
to_tsvector('english', packages.description) @@ plainto_tsquery(:q)
|
to_tsvector('english', packages.description) @@ plainto_tsquery(:q)
|
||||||
", q: query).order("#{rank} desc")
|
", q: query).order("#{rank} desc")
|
||||||
else
|
else
|
||||||
scoped
|
all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
class Screenshot < ActiveRecord::Base
|
class Screenshot < ActiveRecord::Base
|
||||||
belongs_to :package, :inverse_of=>:screenshots
|
belongs_to :package, :inverse_of=>:screenshots
|
||||||
default_scope order('uploaddatetime DESC')
|
default_scope {
|
||||||
|
order('uploaddatetime DESC')
|
||||||
|
}
|
||||||
|
|
||||||
def image_url(size)
|
def image_url(size)
|
||||||
"/screenshots/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png"
|
"/screenshots/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<%= paginator.render do -%>
|
<%= paginator.render do -%>
|
||||||
<div class="pagination">
|
<ul class="pagination">
|
||||||
<ul>
|
|
||||||
<%= first_page_tag unless current_page.first? %>
|
<%= first_page_tag unless current_page.first? %>
|
||||||
<%= prev_page_tag unless current_page.first? %>
|
<%= prev_page_tag unless current_page.first? %>
|
||||||
<% each_page do |page| -%>
|
<% each_page do |page| -%>
|
||||||
|
|
@ -12,6 +11,5 @@
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<%= next_page_tag unless current_page.last? %>
|
<%= next_page_tag unless current_page.last? %>
|
||||||
<%= last_page_tag unless current_page.last? %>
|
<%= last_page_tag unless current_page.last? %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,99 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<nav class="navbar navbar-default" role="navigation"
|
||||||
foo
|
<div class="navbar-header">
|
||||||
</div>
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand" href="#">Brand</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||||
|
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="active"><a href="#">Link</a></li>
|
||||||
|
<li><a href="#">Link</a></li>
|
||||||
|
<li class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#">Action</a></li>
|
||||||
|
<li><a href="#">Another action</a></li>
|
||||||
|
<li><a href="#">Something else here</a></li>
|
||||||
|
<li><a href="#">Separated link</a></li>
|
||||||
|
<li><a href="#">One more separated link</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<form class="navbar-form navbar-left" role="search">
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" class="form-control" placeholder="Search">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-default">Submit</button>
|
||||||
|
</form>
|
||||||
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
<li><a href="#">Link</a></li>
|
||||||
|
<li class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#">Action</a></li>
|
||||||
|
<li><a href="#">Another action</a></li>
|
||||||
|
<li><a href="#">Something else here</a></li>
|
||||||
|
<li><a href="#">Separated link</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- /.navbar-collapse -->
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Search for a package/description:</h1>
|
<h1>Search for a package/description:</h1>
|
||||||
|
|
||||||
<%= form_tag(url_for, method: "get", class: "form-search") do %>
|
<div class="btn-toolbar">
|
||||||
<div class="input-append">
|
<%= form_tag(url_for, method: "get", class: "form-search") do %>
|
||||||
<%= text_field_tag :search, params[:search], autofocus: true, placeholder: 'What are you looking for...', class: "search-query" %>
|
<div class="input-append">
|
||||||
<button class="btn" type="submit">Search!</button>
|
<%= text_field_tag :search, params[:search], autofocus: true, placeholder: 'What are you looking for...', class: "search-query" %>
|
||||||
|
<button class="btn" type="submit">Search!</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<!--<a class="btn" href="#"><i class="icon-th"></i></a>-->
|
||||||
|
<!--<a class="btn" href="#"><i class="icon-th-list"></i></a>-->
|
||||||
|
<button type="button" class="btn" value="1">With screenshots only</button>
|
||||||
|
<button type="button" class="btn" value="0">Any</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--<label class="checkbox">-->
|
||||||
|
<!-- <%= check_box_tag 'with_screenshots', 'yes', params[:with_screenshots] %> -->
|
||||||
|
<!-- Show only packages with screenshots -->
|
||||||
|
<!--</label>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-toolbar">
|
||||||
|
<div class="btn-group">
|
||||||
|
<a class="btn" href="#"><i class="icon-align-left"></i></a>
|
||||||
|
<a class="btn" href="#"><i class="icon-align-center"></i></a>
|
||||||
|
<a class="btn" href="#"><i class="icon-align-right"></i></a>
|
||||||
|
<a class="btn" href="#"><i class="icon-align-justify"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label class="checkbox">
|
<div class="btn-group" data-toggle="buttons">
|
||||||
<%= check_box_tag 'with_screenshots', 'yes', params[:with_screenshots] %>
|
<label class="btn btn-primary">
|
||||||
Show only packages with screenshots
|
<input type="radio" name="options" id="option1"> Option 1
|
||||||
</label>
|
</label>
|
||||||
|
<label class="btn btn-primary">
|
||||||
|
<input type="radio" name="options" id="option2"> Option 2
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-primary">
|
||||||
|
<input type="radio" name="options" id="option3"> Option 3
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="btn-toolbar">
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn" href="#"><i class="icon-align-left"></i></a>
|
|
||||||
<a class="btn" href="#"><i class="icon-align-center"></i></a>
|
|
||||||
<a class="btn" href="#"><i class="icon-align-right"></i></a>
|
|
||||||
<a class="btn" href="#"><i class="icon-align-justify"></i></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<%= render "packages_search_results", object: @packages %>
|
<%= render "packages_search_results", object: @packages %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue