Revision 1297:0a574315af3e .svn/pristine/78

View differences:

.svn/pristine/78/78242b69018c2703c135b242e9ed92962d346aeb.svn-base
1
<h2><%=l(:label_confirmation)%></h2>
2

  
3
<div class="box"><center>
4
<p><strong><%= h(@project.name) %></strong><br /><%=l(:text_wiki_destroy_confirmation)%></p>
5

  
6
<%= form_tag({:controller => 'wikis', :action => 'destroy', :id => @project}) do %>
7
<%= hidden_field_tag "confirm", 1 %>
8
<%= submit_tag l(:button_delete) %>
9
<% end %>
10
</center></div>
.svn/pristine/78/7851fb6d2c8ac3e7230e3330da36a81f831b2c06.svn-base
1
require 'rexml/document'
2

  
3
module Redmine
4
  module VERSION #:nodoc:
5
    MAJOR = 2
6
    MINOR = 2
7
    TINY  = 4
8

  
9
    # Branch values:
10
    # * official release: nil
11
    # * stable branch:    stable
12
    # * trunk:            devel
13
    BRANCH = 'stable'
14

  
15
    # Retrieves the revision from the working copy
16
    def self.revision
17
      if File.directory?(File.join(Rails.root, '.svn'))
18
        begin
19
          path = Redmine::Scm::Adapters::AbstractAdapter.shell_quote(Rails.root.to_s)
20
          if `svn info --xml #{path}` =~ /revision="(\d+)"/
21
            return $1.to_i
22
          end
23
        rescue
24
          # Could not find the current revision
25
        end
26
      end
27
      nil
28
    end
29

  
30
    REVISION = self.revision
31
    ARRAY    = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact
32
    STRING   = ARRAY.join('.')
33

  
34
    def self.to_a; ARRAY  end
35
    def self.to_s; STRING end
36
  end
37
end
.svn/pristine/78/785a68bd048b73020aecfabea697074407a9bb43.svn-base
1
Return-Path: <john.doe@somenet.foo>
2
Received: from osiris ([127.0.0.1])
3
	by OSIRIS
4
	with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
5
Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
6
To: <redmine@somenet.foo>
7
Subject: Ticket by unknown user
8
Date: Sun, 22 Jun 2008 12:28:07 +0200
9
MIME-Version: 1.0
10
Content-Type: text/plain;
11
	format=flowed;
12
	charset="iso-8859-1";
13
	reply-type=original
14
Content-Transfer-Encoding: 7bit
15

  
16
This is a ticket submitted by an unknown user.
17

  
.svn/pristine/78/78a37a0a3569b9f852eefa9ba8497b7e7f0b8f99.svn-base
1
# Redmine - project management software
2
# Copyright (C) 2006-2012  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
module Redmine
19
  module Hook
20
    @@listener_classes = []
21
    @@listeners = nil
22
    @@hook_listeners = {}
23

  
24
    class << self
25
      # Adds a listener class.
26
      # Automatically called when a class inherits from Redmine::Hook::Listener.
27
      def add_listener(klass)
28
        raise "Hooks must include Singleton module." unless klass.included_modules.include?(Singleton)
29
        @@listener_classes << klass
30
        clear_listeners_instances
31
      end
32

  
33
      # Returns all the listerners instances.
34
      def listeners
35
        @@listeners ||= @@listener_classes.collect {|listener| listener.instance}
36
      end
37

  
38
      # Returns the listeners instances for the given hook.
39
      def hook_listeners(hook)
40
        @@hook_listeners[hook] ||= listeners.select {|listener| listener.respond_to?(hook)}
41
      end
42

  
43
      # Clears all the listeners.
44
      def clear_listeners
45
        @@listener_classes = []
46
        clear_listeners_instances
47
      end
48

  
49
      # Clears all the listeners instances.
50
      def clear_listeners_instances
51
        @@listeners = nil
52
        @@hook_listeners = {}
53
      end
54

  
55
      # Calls a hook.
56
      # Returns the listeners response.
57
      def call_hook(hook, context={})
58
        [].tap do |response|
59
          hls = hook_listeners(hook)
60
          if hls.any?
61
            hls.each {|listener| response << listener.send(hook, context)}
62
          end
63
        end
64
      end
65
    end
66

  
67
    # Base class for hook listeners.
68
    class Listener
69
      include Singleton
70
      include Redmine::I18n
71

  
72
      # Registers the listener
73
      def self.inherited(child)
74
        Redmine::Hook.add_listener(child)
75
        super
76
      end
77

  
78
    end
79

  
80
    # Listener class used for views hooks.
81
    # Listeners that inherit this class will include various helpers by default.
82
    class ViewListener < Listener
83
      include ERB::Util
84
      include ActionView::Helpers::TagHelper
85
      include ActionView::Helpers::FormHelper
86
      include ActionView::Helpers::FormTagHelper
87
      include ActionView::Helpers::FormOptionsHelper
88
      include ActionView::Helpers::JavaScriptHelper
89
      include ActionView::Helpers::NumberHelper
90
      include ActionView::Helpers::UrlHelper
91
      include ActionView::Helpers::AssetTagHelper
92
      include ActionView::Helpers::TextHelper
93
      include Rails.application.routes.url_helpers
94
      include ApplicationHelper
95

  
96
      # Default to creating links using only the path.  Subclasses can
97
      # change this default as needed
98
      def self.default_url_options
99
        {:only_path => true }
100
      end
101

  
102
      # Helper method to directly render a partial using the context:
103
      #
104
      #   class MyHook < Redmine::Hook::ViewListener
105
      #     render_on :view_issues_show_details_bottom, :partial => "show_more_data"
106
      #   end
107
      #
108
      def self.render_on(hook, options={})
109
        define_method hook do |context|
110
          if context[:hook_caller].respond_to?(:render)
111
            context[:hook_caller].send(:render, {:locals => context}.merge(options))
112
          elsif context[:controller].is_a?(ActionController::Base)
113
            context[:controller].send(:render_to_string, {:locals => context}.merge(options))
114
          else
115
            raise "Cannot render #{self.name} hook from #{context[:hook_caller].class.name}"
116
          end
117
        end
118
      end
119
      
120
      def controller
121
        nil
122
      end
123
      
124
      def config
125
        ActionController::Base.config
126
      end
127
    end
128

  
129
    # Helper module included in ApplicationHelper and ActionController so that
130
    # hooks can be called in views like this:
131
    #
132
    #   <%= call_hook(:some_hook) %>
133
    #   <%= call_hook(:another_hook, :foo => 'bar') %>
134
    #
135
    # Or in controllers like:
136
    #   call_hook(:some_hook)
137
    #   call_hook(:another_hook, :foo => 'bar')
138
    #
139
    # Hooks added to views will be concatenated into a string. Hooks added to
140
    # controllers will return an array of results.
141
    #
142
    # Several objects are automatically added to the call context:
143
    #
144
    # * project => current project
145
    # * request => Request instance
146
    # * controller => current Controller instance
147
    # * hook_caller => object that called the hook
148
    #
149
    module Helper
150
      def call_hook(hook, context={})
151
        if is_a?(ActionController::Base)
152
          default_context = {:controller => self, :project => @project, :request => request, :hook_caller => self}
153
          Redmine::Hook.call_hook(hook, default_context.merge(context))
154
        else
155
          default_context = { :project => @project, :hook_caller => self }
156
          default_context[:controller] = controller if respond_to?(:controller)
157
          default_context[:request] = request if respond_to?(:request)
158
          Redmine::Hook.call_hook(hook, default_context.merge(context)).join(' ').html_safe
159
        end
160
      end
161
    end
162
  end
163
end
164

  
165
ApplicationHelper.send(:include, Redmine::Hook::Helper)
166
ActionController::Base.send(:include, Redmine::Hook::Helper)
.svn/pristine/78/78b66567c02155be024cd5394ccc97e2082ea1c1.svn-base
1
<% @report.hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
2
<% hours_for_value = select_hours(hours, criterias[level], value) -%>
3
<% next if hours_for_value.empty? -%>
4
<tr class="<%= cycle('odd', 'even') %> <%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
5
<%= ("<td></td>" * level).html_safe %>
6
<td><%= h(format_criteria_value(@report.available_criteria[criterias[level]], value)) %></td>
7
<%= ("<td></td>" * (criterias.length - level - 1)).html_safe -%>
8
  <% total = 0 -%>
9
  <% @report.periods.each do |period| -%>
10
    <% sum = sum_hours(select_hours(hours_for_value, @report.columns, period.to_s)); total += sum -%>
11
    <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
12
  <% end -%>
13
  <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
14
</tr>
15
<% if criterias.length > level+1 -%>
16
  <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
17
<% end -%>
18

  
19
<% end %>
.svn/pristine/78/78dd44b03468d175c9c5d22850a43c7c5d0ba6bc.svn-base
1
Return-Path: <john.doe@somenet.foo>
2
Received: from osiris ([127.0.0.1])
3
	by OSIRIS
4
	with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
5
Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
6
From: "John Doe" <john.doe@somenet.foo>
7
To: <redmine@somenet.foo>
8
Subject: Ticket by unknown user
9
Date: Sun, 22 Jun 2008 12:28:07 +0200
10
MIME-Version: 1.0
11
Content-Type: text/plain;
12
	format=flowed;
13
	charset="iso-8859-1";
14
	reply-type=original
15
Content-Transfer-Encoding: 7bit
16

  
17
This is a ticket submitted by an unknown user.
18

  
.svn/pristine/78/78ef90d8dd2d30dc5f9d99544acf15a71808248b.svn-base
1
/* Indonesian initialisation for the jQuery UI date picker plugin. */
2
/* Written by Deden Fathurahman (dedenf@gmail.com). */
3
jQuery(function($){
4
	$.datepicker.regional['id'] = {
5
		closeText: 'Tutup',
6
		prevText: '&#x3c;mundur',
7
		nextText: 'maju&#x3e;',
8
		currentText: 'hari ini',
9
		monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
10
		'Juli','Agustus','September','Oktober','Nopember','Desember'],
11
		monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
12
		'Jul','Agus','Sep','Okt','Nop','Des'],
13
		dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
14
		dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
15
		dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
16
		weekHeader: 'Mg',
17
		dateFormat: 'dd/mm/yy',
18
		firstDay: 0,
19
		isRTL: false,
20
		showMonthAfterYear: false,
21
		yearSuffix: ''};
22
	$.datepicker.setDefaults($.datepicker.regional['id']);
23
});

Also available in: Unified diff