Tuesday, December 17, 2013
Sunday, December 15, 2013
Redmine: Database table returcture in plugin
ruby script/rails d redmine_plugin_model Dods dod name:string description:string user:string created_at:timestamp created_by:string dod_to:string duration:integer
rake db:rollback
delete last migration
and table from db
rake db:rollback
delete last migration
and table from db
ruby script/rails g redmine_plugin_model Dods dod name:string description:string created_at:timestamp created_by:string dod_to:string duration:integer
rake redmine:plugins:migrate
Saturday, December 14, 2013
Redmine:: import empty scaffold in Redmine
export RAILS_ENV=production
create a scaffold with correct database settings.
copy the model, view,controller into redmine plugin's app folder.
then open the route.rb file of redmine project
add this line
resources :dods #here dods is my plugin name
create a scaffold with correct database settings.
copy the model, view,controller into redmine plugin's app folder.
then open the route.rb file of redmine project
add this line
resources :dods #here dods is my plugin name
Wednesday, December 11, 2013
Redmine plugin creation in Ubuntu 13.10
export RAILS_ENV="production"
ruby script/rails generate redmine_plugin testPlugin
Monday, December 9, 2013
Redmine: Retrieving all issues according to reverse chronological order
@issues = Issue.order("created_on DESC").all
Redmine: Hiding the top menu before authentication
Change the following file from
file :: redmine/app/views/layouts/base.html.erb
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
to
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= render_menu :top_menu if User.current.logged? %>
file :: redmine/app/views/layouts/base.html.erb
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
to
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= render_menu :top_menu if User.current.logged? %>
Saturday, December 7, 2013
Redmine: Calendar object creation
<% @year ||= Date.today.year %>
<% @month ||= Date.today.month %>
<% end %>
<%@calendarLocal = Redmine::Helpers::Calendar.new(Date.civil(@year, @month, 1), current_language, :week) %>
<%=render :partial => 'common/calendar', :locals => {:calendar => @calendarLocal} %>
Redmine: Redirecting a link to project's calendar page
<%= link_to project.name,project_path(project) << "/issues/calendar" %>
Subscribe to:
Posts (Atom)