Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

483 sorting #484

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
20836a7
Ignore db dumps
apohllo Jan 26, 2016
a74df32
Rozwiązanie konfliktu w gitignore
apohllo Jan 26, 2016
3caea37
Update manifestu
apohllo Jan 26, 2016
db36f0e
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jan 26, 2016
e7e4d04
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jan 26, 2016
6fa8e8b
Update manifestu
apohllo Jan 26, 2016
93196d7
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jan 26, 2016
abf2aa1
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jan 28, 2016
807967b
Assets
apohllo Mar 4, 2016
1f6b2a5
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Mar 4, 2016
10f3ad2
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Mar 19, 2016
27affd9
Rozwiązanie konfliktu
apohllo Mar 19, 2016
4831e6e
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Mar 19, 2016
9f08c1a
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Apr 13, 2016
0f2405d
[NT] disable mail delivery
apohllo May 13, 2016
58decbe
[NT] add pages in issue view
apohllo May 13, 2016
564b1a6
Minor change in sprockets manifest
apohllo Jun 24, 2016
3992451
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jun 24, 2016
7122f7c
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jun 27, 2016
aff3c70
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jun 28, 2016
3fab186
Merge with master
apohllo Jun 28, 2016
70b9151
Resolve conflicts
apohllo Jul 5, 2016
6ef1349
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jul 10, 2016
2b94979
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Jul 20, 2016
7af1450
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Aug 5, 2016
3725381
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Sep 7, 2016
759eeb3
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Sep 8, 2016
1eaca0a
Rozwiazanie konfliktu
apohllo Sep 29, 2016
5a8258b
Resolve conflict
apohllo Sep 30, 2016
056f53d
Merge branch 'master' of github.com:apohllo/rocznik into master-prod
apohllo Sep 30, 2016
3e4135c
#483 Fix sorting order
apohllo Apr 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/log/*
!/log/.keep
/tmp
db/dumps
*~
public/uploads
.*sw?
Expand Down
12 changes: 6 additions & 6 deletions app/controllers/authorships_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def create
email = @authorship.person.email
if User.find_by_email(email).nil?
User.create(email: email, password: password, password_confirmation: password)
UserMailer.add(email, password).deliver_now
end
#UserMailer.add(email, password).deliver_now
end
redirect_to submission
else
render :new
end
else
render :new
end
end

def destroy
Expand All @@ -48,7 +48,7 @@ def authorship_params
params.require(:authorship).permit(:person_id,:corresponding,:position)
end

def create_password(len=8)
def create_password(len=8)
SecureRandom.hex(len)
end
end
4 changes: 2 additions & 2 deletions app/controllers/public_reviews_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ def accepted
render :accepted_form
else
@review.accept!(params[:review][:deadline])
ReviewMailer.send_status(@review).deliver_now
ReviewMailer.send_status(@review).deliver_later
end
end

def rejected
@review = Review.find(params[:id])
if @review.email == params[:review][:email]
@review.reject!
ReviewMailer.send_status(@review).deliver_now
ReviewMailer.send_status(@review).deliver_later
else
@review.errors.add(:email,"E-mail jest niepoprawny")
flash[:error] = "Adres e-mail jest niepoprawny"
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/reviews_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def destroy

def ask
review = Review.find(params[:id])
ReviewMailer.ask(review).deliver_now
redirect_to review.submission, flash: {notice: "Zapytanie zostało wysłane"}
#ReviewMailer.ask(review).deliver_now
redirect_to review.submission, flash: {error: "Zapytanie NIE zostało wysłane"}
end

def accepted
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def check_status(old_status,new_status)
if old_status != new_status
if new_status == 'odrzucony' || new_status == 'do poprawy' || new_status == 'przyjęty'
submission = Submission.find(params[:id])
AuthorMailer.send_decision(submission).deliver_later
#AuthorMailer.send_decision(submission).deliver_later
end
if new_status == 'przyjęty'
authors = Submission.find(params[:id]).authors
authors.each do |author|
AuthorMailer.send_contract(submission,author).deliver_later
#AuthorMailer.send_contract(submission,author).deliver_later
end
end
end
Expand Down
10 changes: 9 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ def icon_to(klass,path,options={})
end

def active?(url)
if URI.parse(request_uri).path == URI.parse(url).path
return "" if url.nil?
logger.info([url, request_uri])
logger.info([path_id(url), path_id(request_uri)])
if path_id(request_uri) == path_id(url)
"active"
else
""
Expand All @@ -35,4 +38,9 @@ def reset_filters(f)
def set_title(title = "")
@site_title = !title.empty? ? title + " - " + "Rocznik Kognitywistyczny" : "Rocznik Kognitywistyczny"
end

private
def path_id(url)
URI.parse(url).path.gsub(%r{^/+},"").gsub(%r{/+$},"")
end
end
1 change: 1 addition & 0 deletions app/views/public_issues/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
%li
= article.authors_inline + "."
%i= link_to article.title, public_article_path(article)
= "s. #{article.article_pages}"

12 changes: 8 additions & 4 deletions app/views/shared/sidenav.html.haml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
%ul.nav.navbar-sidebar.nav-pills.nav-stacked
%li{:class => active?("")}
= link_to "Strona główna", "/"
%li{:class => active?("cfp-kognitywistyka-krytyki-i-kontrowersje")}
= link_to "Temat specjalny", "/cfp-kognitywistyka-krytyki-i-kontrowersje"
%li{:class => active?("redakcja")}
= link_to "Redakcja", "/redakcja"
%li{:class => active?("procedura-recenzyjna")}
= link_to "Procedura recenzyjna", "/procedura-recenzyjna"
%li= link_to "Zgłoś artykuł", new_public_submission_path
%li{:class => active?("wytyczne-dla-autorow")}
= link_to "Wytyczne dla autorów", "/wytyczne-dla-autorow"
%li{:class => [active?("public_submissions/new"), "call-to-action"]}= link_to "Zgłoś artykuł", new_public_submission_path
- if user?
%li= link_to "Twój profil", profile_path
%li= link_to "Twoje artykuły", user_submissions_path
%li{:class => active?("profile")}= link_to "Twój profil", profile_path
%li{:class => active?("user_submissions")}= link_to "Twoje artykuły", user_submissions_path
%li{:class => active?(public_issues_path)}= link_to "Numery", public_issues_path
- Issue.published.each do |issue|
- Issue.published.sort_by{|i| - i.volume }.each do |issue|
%li{:class => active?(public_issue_path(issue))}= link_to issue.title, public_issue_path(issue)
.sm-buttons.icon-bar.vertical
.fb-like{"data-action" => "like", "data-href" => "https://www.facebook.com/Rocznik-Kognitywistyczny-213997978935029/", "data-layout" => "button", "data-share" => "true", "data-show-faces" => "true", "data-width" => "300"}
Expand Down

Large diffs are not rendered by default.

Loading