Revision 1298:4f746d8966dd .svn/pristine/3f
| .svn/pristine/3f/3f0e8212628d5f669e97d1ba675898fce5586337.svn-base | ||
|---|---|---|
| 1 |
# Redmine - project management software |
|
| 2 |
# Copyright (C) 2006-2011 Jean-Philippe Lang |
|
| 3 |
# |
|
| 4 |
# This program is free software; you can redistribute it and/or |
|
| 5 |
# modify it under the terms of the GNU General Public License |
|
| 6 |
# as published by the Free Software Foundation; either version 2 |
|
| 7 |
# of the License, or (at your option) any later version. |
|
| 8 |
# |
|
| 9 |
# This program is distributed in the hope that it will be useful, |
|
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
# GNU General Public License for more details. |
|
| 13 |
# |
|
| 14 |
# You should have received a copy of the GNU General Public License |
|
| 15 |
# along with this program; if not, write to the Free Software |
|
| 16 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
| 17 |
|
|
| 18 |
class LdapAuthSourcesController < AuthSourcesController |
|
| 19 |
|
|
| 20 |
protected |
|
| 21 |
|
|
| 22 |
def auth_source_class |
|
| 23 |
AuthSourceLdap |
|
| 24 |
end |
|
| 25 |
end |
|
| .svn/pristine/3f/3f1432f5ae9fdc8b43bfc5b1f1592ae627706799.svn-base | ||
|---|---|---|
| 1 |
# Redmine - project management software |
|
| 2 |
# Copyright (C) 2006-2011 Jean-Philippe Lang |
|
| 3 |
# |
|
| 4 |
# This program is free software; you can redistribute it and/or |
|
| 5 |
# modify it under the terms of the GNU General Public License |
|
| 6 |
# as published by the Free Software Foundation; either version 2 |
|
| 7 |
# of the License, or (at your option) any later version. |
|
| 8 |
# |
|
| 9 |
# This program is distributed in the hope that it will be useful, |
|
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
# GNU General Public License for more details. |
|
| 13 |
# |
|
| 14 |
# You should have received a copy of the GNU General Public License |
|
| 15 |
# along with this program; if not, write to the Free Software |
|
| 16 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
| 17 |
|
|
| 18 |
class GanttsController < ApplicationController |
|
| 19 |
menu_item :gantt |
|
| 20 |
before_filter :find_optional_project |
|
| 21 |
|
|
| 22 |
rescue_from Query::StatementInvalid, :with => :query_statement_invalid |
|
| 23 |
|
|
| 24 |
helper :gantt |
|
| 25 |
helper :issues |
|
| 26 |
helper :projects |
|
| 27 |
helper :queries |
|
| 28 |
include QueriesHelper |
|
| 29 |
helper :sort |
|
| 30 |
include SortHelper |
|
| 31 |
include Redmine::Export::PDF |
|
| 32 |
|
|
| 33 |
def show |
|
| 34 |
@gantt = Redmine::Helpers::Gantt.new(params) |
|
| 35 |
@gantt.project = @project |
|
| 36 |
retrieve_query |
|
| 37 |
@query.group_by = nil |
|
| 38 |
@gantt.query = @query if @query.valid? |
|
| 39 |
|
|
| 40 |
basename = (@project ? "#{@project.identifier}-" : '') + 'gantt'
|
|
| 41 |
|
|
| 42 |
respond_to do |format| |
|
| 43 |
format.html { render :action => "show", :layout => !request.xhr? }
|
|
| 44 |
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image')
|
|
| 45 |
format.pdf { send_data(@gantt.to_pdf, :type => 'application/pdf', :filename => "#{basename}.pdf") }
|
|
| 46 |
end |
|
| 47 |
end |
|
| 48 |
end |
|
| .svn/pristine/3f/3f7e33eb719b73cf1721b389cca78ecdef336acd.svn-base | ||
|---|---|---|
| 1 |
# encoding: utf-8 |
|
| 2 |
# |
|
| 3 |
# Redmine - project management software |
|
| 4 |
# Copyright (C) 2006-2013 Jean-Philippe Lang |
|
| 5 |
# |
|
| 6 |
# This program is free software; you can redistribute it and/or |
|
| 7 |
# modify it under the terms of the GNU General Public License |
|
| 8 |
# as published by the Free Software Foundation; either version 2 |
|
| 9 |
# of the License, or (at your option) any later version. |
|
| 10 |
# |
|
| 11 |
# This program is distributed in the hope that it will be useful, |
|
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 14 |
# GNU General Public License for more details. |
|
| 15 |
# |
|
| 16 |
# You should have received a copy of the GNU General Public License |
|
| 17 |
# along with this program; if not, write to the Free Software |
|
| 18 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
| 19 |
|
|
| 20 |
module JournalsHelper |
|
| 21 |
def render_notes(issue, journal, options={})
|
|
| 22 |
content = '' |
|
| 23 |
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project))) |
|
| 24 |
links = [] |
|
| 25 |
if !journal.notes.blank? |
|
| 26 |
links << link_to(image_tag('comment.png'),
|
|
| 27 |
{:controller => 'journals', :action => 'new', :id => issue, :journal_id => journal},
|
|
| 28 |
:remote => true, |
|
| 29 |
:method => 'post', |
|
| 30 |
:title => l(:button_quote)) if options[:reply_links] |
|
| 31 |
links << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes",
|
|
| 32 |
{ :controller => 'journals', :action => 'edit', :id => journal, :format => 'js' },
|
|
| 33 |
:title => l(:button_edit)) if editable |
|
| 34 |
end |
|
| 35 |
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
|
|
| 36 |
content << textilizable(journal, :notes) |
|
| 37 |
css_classes = "wiki" |
|
| 38 |
css_classes << " editable" if editable |
|
| 39 |
content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes)
|
|
| 40 |
end |
|
| 41 |
|
|
| 42 |
def link_to_in_place_notes_editor(text, field_id, url, options={})
|
|
| 43 |
onclick = "$.ajax({url: '#{url_for(url)}', type: 'get'}); return false;"
|
|
| 44 |
link_to text, '#', options.merge(:onclick => onclick) |
|
| 45 |
end |
|
| 46 |
end |
|
| .svn/pristine/3f/3fac3fc235a53c2e2d4d021dffb9a965b1506411.svn-base | ||
|---|---|---|
| 1 |
class AddQueriesType < ActiveRecord::Migration |
|
| 2 |
def up |
|
| 3 |
add_column :queries, :type, :string |
|
| 4 |
end |
|
| 5 |
|
|
| 6 |
def down |
|
| 7 |
remove_column :queries, :type |
|
| 8 |
end |
|
| 9 |
end |
|
| .svn/pristine/3f/3ff64c6f7b8c7d1560b577e6e864916cca4fbd1d.svn-base | ||
|---|---|---|
| 1 |
#!/usr/bin/env ruby |
|
| 2 |
require File.expand_path('../../config/boot', __FILE__)
|
|
| 3 |
require 'commands/process/inspector' |
|
Also available in: Unified diff