forked from publify/publify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move lang to locale for dashboard overview part
- Loading branch information
Yannick Francois
committed
Oct 9, 2013
1 parent
05e3141
commit 5a65699
Showing
35 changed files
with
180 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,9 @@ | ||
module Admin::DashboardHelper | ||
def dashboard_theme_link | ||
return unless current_user.can_access_to_themes? | ||
_("You can also do a bit of design, %s or %s." , | ||
link_to(_("change your blog presentation"), :controller => 'themes') , | ||
link_to(_("enable plugins"), :controller => 'sidebar')) | ||
end | ||
|
||
def dashboard_sidebar_link | ||
return unless current_user.can_access_to_customizesidebar? | ||
_("You can also %s to customize your Publify blog.", | ||
link_to(_('download some plugins'), 'http://plugins.publify.co')) | ||
end | ||
|
||
def dashboard_action_links | ||
links = [] | ||
|
||
links << link_to(_('write a post'), :controller => 'content', :action => 'new') if current_user.can_access_to_articles? | ||
links << link_to(_('write a page'), :controller => 'pages', :action => 'new') if current_user.can_access_to_pages? | ||
links << link_to(_("update your profile or change your password"), :controller => 'profiles', :action => 'index') if current_user.can_access_to_profile? | ||
|
||
links << link_to(t('.write_a_post'), controller: 'content', action: 'new') if current_user.can_access_to_articles? | ||
links << link_to(t('.write_a_page'), controller: 'pages', action: 'new') if current_user.can_access_to_pages? | ||
links << link_to(t(".update_your_profile_or_change_your_password"), controller: 'profiles', action: 'index') if current_user.can_access_to_profile? | ||
links.join(', ') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<div class='alert alert-info'> | ||
<p> | ||
<%= _("This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %s", dashboard_action_links) %> | ||
</p> | ||
<p> | ||
<%= dashboard_theme_link %> | ||
<%= t(".dashboard_explain", available_actions: dashboard_action_links) %> | ||
</p> | ||
<%- if current_user.can_access_to_themes? %> | ||
<p> | ||
<%= t(".customization_explain", theme_link: link_to(t(".change_your_blog_presentation"), controller: 'themes'), sidebar_link: link_to(t(".enable_plugins"), controller: 'sidebar')) %> | ||
</p> | ||
<%- end %> | ||
<p> | ||
<%= _("If you need help, %s.", | ||
link_to(_('read our documentation'), 'http://publify.co')) %> <%= dashboard_sidebar_link %> | ||
<%= t(".help_explain", doc_link: link_to(t('.read_our_documentation'), 'http://publify.co')) %> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.