Added breadcrumbs and offer filters
This commit is contained in:
@@ -22,6 +22,10 @@ li.offer, li.inquiry {
|
||||
@extend %li.post;
|
||||
}
|
||||
|
||||
#side-nav .well {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
@media screen {
|
||||
body {
|
||||
padding-top: 60px;
|
||||
@@ -38,4 +42,4 @@ li.offer, li.inquiry {
|
||||
body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
%ul.breadcrumb#breadcrumb
|
||||
%li
|
||||
= link_to root_path do
|
||||
%i.icon-home
|
||||
%span.divider •
|
||||
- if @offer
|
||||
%li
|
||||
= link_to offers_path do
|
||||
%i.icon-hand-up
|
||||
= t "application.nav.offers"
|
||||
%span.divider •
|
||||
- if @offer.persisted?
|
||||
- if defined?(action)
|
||||
%li
|
||||
= link_to @offer.title, @offer
|
||||
%span.divider •
|
||||
%li.active= t action
|
||||
- else
|
||||
%li.active= @offer.title
|
||||
- else
|
||||
%li.active= t '.new'
|
||||
- else
|
||||
%li.active
|
||||
%i.icon-hand-up
|
||||
= t "application.nav.offers"
|
||||
@@ -1 +1,2 @@
|
||||
= render 'breadcrumb'
|
||||
= render 'form'
|
||||
@@ -1,30 +1,46 @@
|
||||
= render 'breadcrumb'
|
||||
|
||||
= link_to("New offer", new_offer_path)
|
||||
|
||||
- if @category.present?
|
||||
= link_to offers_path(params.merge(:cat => nil)), :class => ["label", "label-success"] do
|
||||
%i.icon-folder-open-alt
|
||||
= @category.name
|
||||
×
|
||||
- if @tag_list.present?
|
||||
|
||||
.tag-cloud
|
||||
%strong
|
||||
- if params[:tag].present?
|
||||
= link_to "×", offers_path(params.merge(:tag => nil))
|
||||
= succeed ":" do
|
||||
= t ".by_tag"
|
||||
= params[:tag]
|
||||
- else
|
||||
= t ".by_tag"
|
||||
- @tag_list.each do |tag|
|
||||
= link_to offers_path(params.merge(:tag => (@tag_list.dup.remove tag).to_s.presence)), :class => ["label"] do
|
||||
%i.icon-tag
|
||||
= tag
|
||||
×
|
||||
.accordion
|
||||
.accordion-group
|
||||
.accordion-heading
|
||||
%a.accordion-toggle{href: "#filterPanel", data: {toggle: "collapse"}}
|
||||
%i.icon-filter
|
||||
= t ".filter"
|
||||
|
||||
- tag_cloud(current_organization.offers.tag_counts_on(:tags), %w(css1 css2 css3 css4)) do |tag, css_class|
|
||||
= link_to tag.name, offers_path(params.merge(:tag => tag.name)), :class => css_class
|
||||
.accordion-body.collapse#filterPanel{class: ("in" if @tag_list.present? or @category.present?)}
|
||||
.accordion-inner
|
||||
.row-fluid
|
||||
|
||||
.categ
|
||||
%strong
|
||||
- if params[:cat].present?
|
||||
= link_to "×", offers_path(params.merge(:cat => nil))
|
||||
= succeed ":" do
|
||||
= t ".by_category"
|
||||
= Category.find(params[:cat]).name
|
||||
- else
|
||||
= t ".by_category"
|
||||
- Category.all.each do |cat|
|
||||
= link_to cat.name, offers_path(params.merge(:cat => cat.id))
|
||||
.span4
|
||||
%h5
|
||||
%i.icon-folder-open-alt
|
||||
= t ".by_category"
|
||||
- Category.all.each do |cat|
|
||||
= link_to cat.name, offers_path(params.merge(:cat => (cat.id unless cat == @category))), :class => ["btn", "btn-small", (cat == @category ? "btn-info" : "btn-link")]
|
||||
|
||||
.span4
|
||||
%h5
|
||||
%i.icon-tag
|
||||
= t ".by_tag"
|
||||
- tag_cloud(@tag_cloud, %w(css1 css2 css3 css4)) do |tag, css_class|
|
||||
- if @tag_list.include? tag.name
|
||||
= link_to tag.name, offers_path(params.merge(:tag => (@tag_list.dup.remove tag.name).to_s.presence)), :class => ["btn", "btn-small", "btn-inverse"]
|
||||
- else
|
||||
= link_to tag.name, offers_path(params.merge(:tag => (@tag_list.dup.add tag.name).to_s)), :class => ["btn", "btn-small", "btn-link"]
|
||||
|
||||
|
||||
%ul
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
= render 'breadcrumb'
|
||||
= render 'form'
|
||||
@@ -1,3 +1,5 @@
|
||||
= render 'breadcrumb'
|
||||
|
||||
%h1
|
||||
= @offer.title
|
||||
%small= @offer.category
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
%ul.breadcrumb#breadcrumb
|
||||
%li
|
||||
= link_to root_path do
|
||||
%i.icon-home
|
||||
%span.divider •
|
||||
- if @user
|
||||
%li
|
||||
= link_to users_path do
|
||||
%i.icon-user
|
||||
= t "application.nav.users"
|
||||
%span.divider •
|
||||
- if @user.persisted?
|
||||
- if defined?(action)
|
||||
%li
|
||||
= link_to @user.username, @user
|
||||
%span.divider •
|
||||
%li.active= t action
|
||||
- else
|
||||
%li.active= @user.username
|
||||
- else
|
||||
%li.active= t '.new'
|
||||
- else
|
||||
%li.active
|
||||
%i.icon-user
|
||||
= t "application.nav.users"
|
||||
@@ -1,18 +1,4 @@
|
||||
%ul.breadcrumb#breadcrumb
|
||||
%li
|
||||
= link_to root_path do
|
||||
%i.icon-home
|
||||
%span.divider •
|
||||
%li
|
||||
= link_to users_path do
|
||||
%i.icon-user
|
||||
= t "application.nav.users"
|
||||
%span.divider •
|
||||
%li
|
||||
= link_to user_path(@user) do
|
||||
= @user.username
|
||||
%span.divider •
|
||||
%li.active= t "change_password"
|
||||
= render "breadcrumb", action: "change_password"
|
||||
|
||||
%h1
|
||||
%i.icon-key.icon-border
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
%ul.breadcrumb#breadcrumb
|
||||
%li
|
||||
= link_to root_path do
|
||||
%i.icon-home
|
||||
%span.divider •
|
||||
%li
|
||||
= link_to users_path do
|
||||
%i.icon-user
|
||||
= t "application.nav.users"
|
||||
%span.divider •
|
||||
%li.active= @user.username
|
||||
= render "breadcrumb"
|
||||
|
||||
%h1
|
||||
%i.icon-edit.icon-fixed-width
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
%ul.breadcrumb#breadcrumb
|
||||
%li
|
||||
= link_to root_path do
|
||||
%i.icon-home
|
||||
%span.divider •
|
||||
%li.active
|
||||
= link_to_unless_current users_path do
|
||||
%i.icon-tags
|
||||
= t "application.nav.users"
|
||||
= render "breadcrumb"
|
||||
|
||||
%h1
|
||||
%i.icon-user.icon-border
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
%ul.breadcrumb#breadcrumb
|
||||
%li
|
||||
= link_to root_path do
|
||||
%i.icon-home
|
||||
%span.divider •
|
||||
%li
|
||||
= link_to users_path do
|
||||
%i.icon-user
|
||||
= t "application.nav.users"
|
||||
%span.divider •
|
||||
%li.active= t "New user"
|
||||
|
||||
= render "breadcrumb"
|
||||
|
||||
%h1
|
||||
%i.icon-user.icon-border
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
%ul.breadcrumb#breadcrumb
|
||||
%li
|
||||
= link_to root_path do
|
||||
%i.icon-home
|
||||
%span.divider •
|
||||
%li
|
||||
= link_to users_path do
|
||||
%i.icon-user
|
||||
= t "application.nav.users"
|
||||
%span.divider •
|
||||
%li.active= @user.username
|
||||
|
||||
= render "breadcrumb"
|
||||
|
||||
%h1
|
||||
%i.icon-user.icon-border
|
||||
|
||||
Reference in New Issue
Block a user