        <%= link_to '', "http://helpmeinvestigate.com/"%>
        <%= link_to 'Get help investigating', "http://helpmeinvestigate.com/"%>

        <%= link_to '', "http://www.writetothem.com"%>
        <%= link_to 'Write to your politician', "http://www.writetothem.com"%>

        <%= link_to '', "http://www.pledgebank.com"%>
        <%= link_to 'Pledge with others', "http://www.pledgebank.com"%>

Mark links as html safe now escaping is done automatically.

        <%= link_to ''.html_safe, "http://helpmeinvestigate.com/"%>
        <%= link_to 'Get help investigating', "http://helpmeinvestigate.com/"%>

        <%= link_to ''.html_safe, "http://www.writetothem.com"%>
        <%= link_to 'Write to your politician', "http://www.writetothem.com"%>

        <%= link_to ''.html_safe, "http://www.pledgebank.com"%>
        <%= link_to 'Pledge with others', "http://www.pledgebank.com"%>


<%= link_to 'Back', :action => 'show_observation', :id => @comment.observation %>
<% if check_permission(@comment.user_id) %>
	| <%= link_to 'Edit', :action => 'edit_comment', :id => @comment %>
	| <%= link_to 'Destroy', :action => 'destroy_comment', :id => @comment %>
<% end %>

Comment on <%= h @comment.observation.unique_name %>

Created: <%= @comment.created.to_formatted_s(:db) %>

By: <%= @comment.user.unique_name %>

Summary: <%= @comment.summary %>

Comment: <%= textilize @comment.comment %>

Switch Back link to Goto Observsation

<%= link_to 'Goto Observation', :action => 'show_observation', :id => @comment.observation %>
<% if check_permission(@comment.user_id) %>
	| <%= link_to 'Edit', :action => 'edit_comment', :id => @comment %>
	| <%= link_to 'Destroy', :action => 'destroy_comment', :id => @comment %>
<% end %>

Comment on <%= h @comment.observation.unique_name %>

Created: <%= @comment.created.to_formatted_s(:db) %>

By: <%= @comment.user.unique_name %>

Summary: <%= @comment.summary %>

Comment: <%= textilize @comment.comment %>


Help pages

<%= link_to_unless_current "Introduction", "/help/about" %>

<%= link_to_unless_current "Making requests", "/help/requesting" %>

<%= link_to_unless_current "Your privacy", "/help/privacy" %>

<%= link_to_unless_current "FOI officers", "/help/officers" %>

<%= link_to_unless_current "About the software", "/help/alaveteli" %>

<%= link_to_unless_current "Credits", "/help/credits" %>

<%= link_to_unless_current "Programmers API", "/help/api" %>

<%= link_to_unless_current "Help us", "/help/help_out" %>

<%= link_to_unless_current "Advanced search", "/search" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
    something about the site, contact us.

Make advanced search link in help sidebar point at advancedsearch rather than search

Help pages

<%= link_to_unless_current "Introduction", "/help/about" %>

<%= link_to_unless_current "Making requests", "/help/requesting" %>

<%= link_to_unless_current "Your privacy", "/help/privacy" %>

<%= link_to_unless_current "FOI officers", "/help/officers" %>

<%= link_to_unless_current "About the software", "/help/alaveteli" %>

<%= link_to_unless_current "Credits", "/help/credits" %>

<%= link_to_unless_current "Programmers API", "/help/api" %>

<%= link_to_unless_current "Help us", "/help/help_out" %>

<%= link_to_unless_current "Advanced search", "/advancedsearch" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
    something about the site, contact us.


  <%= render :partial => "common_details", :object => way_details %>

    <%= t'browse.way_details.nodes' %>

        <% way_details.way_nodes.each do |wn| %>

            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
            <% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %>
	    <% if related_ways.size > 0 then %>
              (<%= t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.to_sentence %>)
            <% end %>

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

      <%= t'browse.way_details.part_of' %>

          <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>

  <% end %>

Revert to using join instead of to_sentence for now as to_sentence is broken in rails 2.2 when I18N is in use. We can go back to using to_sentence once we have gone to rails 2.3 which fixes the problem.

  <%= render :partial => "common_details", :object => way_details %>

    <%= t'browse.way_details.nodes' %>

        <% way_details.way_nodes.each do |wn| %>

            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
            <% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %>
	    <% if related_ways.size > 0 then %>
              (<%= t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.join(",") %>)
            <% end %>

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

      <%= t'browse.way_details.part_of' %>

          <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>

  <% end %>


Tudalennau cymorth

<%= link_to_unless_current "Cyflwyniad", help_about_path %>

<%= link_to_unless_current "Gwneud ceisiadau", help_requesting_path %>

<%= link_to_unless_current "Eich preifatrwydd", help_privacy_path %>

<%= link_to_unless_current "Swyddogion Rhyddid Gwybodaeth", help_officers_path %>

<%= link_to_unless_current "Credydau", help_credits_path %>

<%= link_to_unless_current "API Rhaglenwyr", help_api_path %>

<%= link_to_unless_current "Chwiliad manwl", advanced_search_path %>

Cysylltwch â ni

Os nad yw eich cwestiwn yn cael ei ateb yma, neu eich bod jyst eisiau
gadael i ni wybod rhywbeth am y wefan, <a href="<%= help_contact_path %>">cysylltwch â ni.

Add Alaveteli link to Welsh help sidebar.

Tudalennau cymorth

<%= link_to_unless_current "Cyflwyniad", help_about_path %>

<%= link_to_unless_current "Gwneud ceisiadau", help_requesting_path %>

<%= link_to_unless_current "Eich preifatrwydd", help_privacy_path %>

<%= link_to_unless_current "Swyddogion Rhyddid Gwybodaeth", help_officers_path %>

<%= link_to_unless_current "Credydau", help_credits_path %>

<%= link_to_unless_current "API Rhaglenwyr", help_api_path %>

<%= link_to_unless_current "Chwiliad manwl", advanced_search_path %>

<%= link_to_unless_current "Alaveteli", help_alaveteli_path %>

Cysylltwch â ni

Os nad yw eich cwestiwn yn cael ei ateb yma, neu eich bod jyst eisiau
gadael i ni wybod rhywbeth am y wefan, <a href="<%= help_contact_path %>">cysylltwch â ni.


<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%>

    <% new_params = params_for(:action => :table) %>
    <% active_scaffold_config.action_links.each :table do |link| -%>
      <% next if controller.respond_to? link.security_method and !controller.send(link.security_method) -%>
      <%= render_action_link(link, new_params) -%>
    <% end -%>

    <%= loading_indicator_tag(:action => :table) %>

<% end %>

<%= active_scaffold_config.list.user.label %>

Hide search button when always_show_search is true

<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%>

    <% new_params = params_for(:action => :table) %>
    <% active_scaffold_config.action_links.each :table do |link| -%>
	  <% next if link.action == 'show_search' && active_scaffold_config.list.always_show_search? %>
      <% next if controller.respond_to? link.security_method and !controller.send(link.security_method) -%>
      <%= render_action_link(link, new_params) -%>
    <% end -%>

    <%= loading_indicator_tag(:action => :table) %>

<% end %>

<%= active_scaffold_config.list.user.label %>


<%= required_fields_message %>

<%# TODO add Textile help here %>

<%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64')) %>

<%= render :partial => 'translatable' %>
<%= render :partial => 'shared/lead_and_body' %>

USe 72 columns when editing textile text

<%= required_fields_message %>

<%# TODO add Textile help here %>

<%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '72')) %>

<%= render :partial => 'translatable' %>
<%= render :partial => 'shared/lead_and_body' %>


<% form_tag '../redeliver_incoming', :class => "form form-inline" do %>

      id or url_title of request:
      <% if @info_requests && @info_requests.size == 1 %>
        <%= text_field_tag 'url_title', @info_requests[0].url_title, { :size => 20 } %>
      <% else %>
        <%= text_field_tag 'url_title', "", { :size => 20 } %>
      <% end %>
      <%= hidden_field_tag 'redeliver_incoming_message_id', incoming_message.id %>
      <%= submit_tag "Redeliver to another request", :class => "btn btn-warning" %>

<% end %>

<%= link_to 'Generate FOI officer upload URL', "../generate_upload_url/#{incoming_message.info_request.id}?incoming_message_id=#{incoming_message.id}", :class => "btn" %>

<% form_tag '../destroy_incoming', :class => "form form-inline" do %>
  <%= hidden_field_tag 'incoming_message_id', incoming_message.id %>

    Warning, this is permanent!

  <%= submit_tag "Destroy message", :class => "btn btn-danger" %>
<% end %>

Make the "warning, this is permanent" message a bit less ugly (the button is red, anyway)

<% form_tag '../redeliver_incoming', :class => "form form-inline" do %>

      id or url_title of request:
      <% if @info_requests && @info_requests.size == 1 %>
        <%= text_field_tag 'url_title', @info_requests[0].url_title, { :size => 20 } %>
      <% else %>
        <%= text_field_tag 'url_title', "", { :size => 20 } %>
      <% end %>
      <%= hidden_field_tag 'redeliver_incoming_message_id', incoming_message.id %>
      <%= submit_tag "Redeliver to another request", :class => "btn btn-warning" %>

<% end %>

<%= link_to 'Generate FOI officer upload URL', "../generate_upload_url/#{incoming_message.info_request.id}?incoming_message_id=#{incoming_message.id}", :class => "btn" %>

<% form_tag '../destroy_incoming', :class => "form form-inline" do %>
  <%= hidden_field_tag 'incoming_message_id', incoming_message.id %>
  <%= submit_tag "Destroy message", :class => "btn btn-danger" %>
  Warning, this is permanent!
<% end %>


<%= render :file => 'shared/tiny_mce' %>

<%= labelled_form_field(_('Text'), text_area(:article, 'body', :cols => 40, :style => 'width:99%')) %>

Fix use of tinymce on enterprise homepage

<%= render :file => 'shared/tiny_mce' %>

<%= labelled_form_field(_('Text'), text_area(:article, 'body', :cols => 40, :style => 'width:99%', :class => 'mceEditor')) %>


Hi <%= @to_user %>,

<%= @from_user %> has sent you a message through OpenStreetMap with the subject "<%= @subject %>":

==
<%= @body %>
==

You can also read the message at <%= @readurl %>
and you can reply at <%= @replyurl %>

Add warnings not to reply to message notifications directly.


You have a new response to the <%= @info_request.law_used_full %> request
'<%= @info_request.title %>' that you made to
<%= @info_request.public_body.name %>.

To view the response, click on the link below.

<%=@url%>

When you get there, let us know if the response contains any
useful information.

Although all responses are automatically published, we depend on
you, the original requester, to evaluate them.

-- the WhatDoTheyKnow team

Fix text to make it clear the status update is on the website not in the email.

You have a new response to the <%= @info_request.law_used_full %> request
'<%= @info_request.title %>' that you made to
<%= @info_request.public_body.name %>.

To view the response, click on the link below.

<%=@url%>

When you get there, please update the status to say if the response
contains any useful information.

Although all responses are automatically published, we depend on
you, the original requester, to evaluate them.

-- the WhatDoTheyKnow team


Please check the URL (i.e. the long code of letters and numbers) is copied
correctly from your email.

If you can't click on it in the email, you'll have to select and copy it from
the email.  Then paste it into your browser, into the place you would type the
address of any other webpage.

If you got the email more than a year ago, then this login link won't work any
more. Please try doing what you were doing from the beginning.

Update quite old out of date bad token text

Please check the URL (i.e. the long code of letters and numbers) is copied
correctly from your email.

If you can't click on it in the email, you'll have to select and copy it from
the email.  Then paste it into your browser, into the place you would type the
address of any other webpage.

If you got the email more than six months ago, then this login link won't work any
more. Please try doing what you were doing from the beginning.


<%= @outgoing_message.body.strip %>

-------------------------------------------------------------------
Is <%= @info_request.public_body.request_email%> the wrong address for Freedom
of Information requests to <%= @info_request.public_body.name%>? If so please
let us know by emailing <%=@contact_email%>. We'll make sure future ones go to
the right place.
-------------------------------------------------------------------

Make sure there isn't a full stop immediately after our email, in case some mail clients include it in the address

<%= @outgoing_message.body.strip %>

-------------------------------------------------------------------
Is <%= @info_request.public_body.request_email%> the wrong address for Freedom
of Information requests to <%= @info_request.public_body.name%>? If so please
let us know by emailing <%=@contact_email%> - we'll make sure future ones go to
the right place.
-------------------------------------------------------------------


<%= error_messages_for 'page' %>

  Location:

  /page/ <%= text_field 'page', 'name', :size => 16  %>

  Title:

  <%= text_field 'page', 'title', :size => 20  %>

  Content:

  <%= text_area 'page', 'body', :rows => 25, :cols => 65  %>

Textfilter: <%= select 'page', 'text_filter', text_filter_options %>

Fix minor typo on pages admin page

<%= error_messages_for 'page' %>

  Location:

  /pages/ <%= text_field 'page', 'name', :size => 16  %>

  Title:

  <%= text_field 'page', 'title', :size => 20  %>

  Content:

  <%= text_area 'page', 'body', :rows => 25, :cols => 65  %>

Textfilter: <%= select 'page', 'text_filter', text_filter_options %>


    <%
    active_scaffold_config_for(@record.class).subform.columns.each :for => @record, :flatten => true do |column|
      next unless in_subform?(column, parent_record)
      -%>
      <%= column.label %>
    <% end -%>

Hide hidden column header labels - like lock_version - in sub-forms.

    <%
    active_scaffold_config_for(@record.class).subform.columns.each :for => @record, :flatten => true do |column|
      next unless in_subform?(column, parent_record) and column_renders_as(column) != :hidden
      -%>
      <%= column.label %>
    <% end -%>


  <%= render :partial => "common_details", :object => way_details %>

    <%= t'browse.way_details.nodes' %>

        <% way_details.way_nodes.each do |wn| %>

            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
	    <% if wn.node.ways.size > 1 then %>
	      (also part of <%= wn.node.ways.reject { |w| w.id == way_details.id }.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.join(", ") %>)
            <% end %>

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

      <%= t'browse.way_details.part_of' %>

          <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>

  <% end %>

Handle nodes which are in the same way multiple times.

  <%= render :partial => "common_details", :object => way_details %>

    <%= t'browse.way_details.nodes' %>

        <% way_details.way_nodes.each do |wn| %>

            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
            <% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %>
	    <% if related_ways.size > 0 then %>
	      (also part of <%= related_ways.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.join(", ") %>)
            <% end %>

        <% end %>

  <% unless way_details.containing_relation_members.empty? %>

      <%= t'browse.way_details.part_of' %>

          <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>

  <% end %>


<%= _('Select the groups where you want to publish your article') %>

<% if !@failed.blank? %>

<%=_("There were errors with the following communities: ")%>

    <% @failed.each do |error, communities|%>
       <%= error %>:

        <% communities.each do |community| %>

 <%= community %>

        <% end %>

    <% end %>

<% end %>

<% if @article.type != "Event" %>
  <% form_tag do%>
    <%= hidden_field_tag :back_to, @back_to %>
    <% @groups.each do |group| %>
      <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

      <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>

    <% end %>

    <% button_bar do %>
      <%= submit_button 'spread', _('Publish') %>
    <% end %>
  <% end %>
<% else %>

    <%= _("This option is temporarily disabled.") %>

<% end %>

Replace checking of type attribute with is_a? call

<%= _('Select the groups where you want to publish your article') %>

<% if !@failed.blank? %>

<%=_("There were errors with the following communities: ")%>

    <% @failed.each do |error, communities|%>
       <%= error %>:

        <% communities.each do |community| %>

 <%= community %>

        <% end %>

    <% end %>

<% end %>

<% unless @article.is_a?(Event) %>
  <% form_tag do%>
    <%= hidden_field_tag :back_to, @back_to %>
    <% @groups.each do |group| %>
      <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %>

      <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>

    <% end %>

    <% button_bar do %>
      <%= submit_button 'spread', _('Publish') %>
    <% end %>
  <% end %>
<% else %>

    <%= _("This option is temporarily disabled.") %>

<% end %>


<% case opt[2]
    when 'string': -%>
    <%= f.text_field opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% when "image": -%>
      <%= f.filemanager_image opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% when "src": -%>
      <%= f.filemanager_file opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% when "url": -%>
      <%= f.select opt[0].to_sym, [['--Select Page--'.t,'']] +  SiteNode.page_url_options, :label => opt[1], :description => opt[3] %>
    <% when "color": -%>
      <%= f.color_field opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% else -%>
      <% f.custom_field opt[0], :description => opt[3] do -%>
        <%= opt[0] %> - <%= opt[2] %>
      <% end -%>
    <% end -%>

Fix to remove variables named test

<%
  if opt[0].to_sym == :test
    ''
  else
    case opt[2]
    when 'string': -%>
    <%= raise opt.inspect %>
    <%= f.text_field opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% when "image": -%>
      <%= f.filemanager_image opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% when "src": -%>
      <%= f.filemanager_file opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% when "url": -%>
      <%= f.select opt[0].to_sym, [['--Select Page--'.t,'']] +  SiteNode.page_url_options, :label => opt[1], :description => opt[3] %>
    <% when "color": -%>
      <%= f.color_field opt[0].to_sym, :label => opt[1], :description => opt[3] %>
    <% else -%>
      <% f.custom_field opt[0], :description => opt[3] do -%>
        <%= opt[0] %> - <%= opt[2] %>
      <% end -%>
    <% end -%>
  <% end -%>


<%= @outgoing_message.body.strip %>

-------------------------------------------------------------------

This is a request for access to information under XXX law of the Czech Republic, or Regulation X of Law Y, which has been sent via <%= site_name %> on behalf of:
<%-# !!!IF YOU CHANGE THE FORMAT OF THE BLOCK BELOW, ADD A NEW CENSOR RULE!!! -%>
===================================================================
# Name: <%= @outgoing_message.info_request.user.name %>
# DOB:  <%= @outgoing_message.info_request.user.dob %>
<%= @outgoing_message.info_request.user.address.gsub(/^/, "# Address: ") %>
===================================================================

<%= render :partial => 'followup_footer' %>

-------------------------------------------------------------------

Add more custom text to the outgoing message view.

Žádost o zpřístupnění informace ve smyslu zákona č. 106/1999 Sb., o svobodném přístupu k
informacím.

Povinný subjekt:
<%= @outgoing_message.info_request.public_body.name %>

Žadatel:
<%-# !!!IF YOU CHANGE THE FORMAT OF THE BLOCK BELOW, ADD A NEW CENSOR RULE!!! -%>
===================================================================
# Name: <%= @outgoing_message.info_request.user.name %>
# DOB:  <%= @outgoing_message.info_request.user.dob %>
<%= @outgoing_message.info_request.user.address.gsub(/^/, "# Address: ") %>
===================================================================

Žádám o následující informaci:

<%= @outgoing_message.body.strip %>

Informaci poskytněte elektronicky na email: <%= @outgoing_message.info_request.incoming_email %>

Řádným a včasným zpřístupněním informace na základě této žádosti nebo jiným posouzením
žádosti podle zákona č. 106/1999 Sb., o svobodném přístupu k informacím, beru na vědomí, že
jste splnili svou povinnosti podle výše uvedeného zákona.
Datum podání:

<%= simple_date(Time.now) %>
-------------------------------------------------------------------

<%= render :partial => 'followup_footer' %>

-------------------------------------------------------------------


<% unless @content.errors[:base].nil? %>
  <%= @content.errors[:base] %>
<% else %>

 Choose a date to see specific project results:

    <input id="datepicker_field" style="display:none"/>

<%= _('Last Result') %>

      <%= _('Date') %>
      <%= @project_result.date %>

      <%= _('Load time') %>
      <%= @project_result.formatted_load_time %>

      <%= _('Analysis time') %>
      <%= @project_result.formatted_analysis_time %>

<% end %>

Set default date to project result date.

<% unless @content.errors[:base].nil? %>
  <%= @content.errors[:base] %>
<% else %>

 Choose a date to see specific project results:

  <div id="datepicker" data-date="<%= @project_result.date %>">
    <input id="datepicker_field" style="display:none"/>

<%= _('Last Result') %>

      <%= _('Date') %>
      <%= @project_result.date %>

      <%= _('Load time') %>
      <%= @project_result.formatted_load_time %>

      <%= _('Analysis time') %>
      <%= @project_result.formatted_analysis_time %>

<% end %>


Hi<%= raw " #{@recipient.name}" %>,

Please click on the link below to confirm the update you just
added to FixMyTransport:

<%= raw @link %>

If your email program does not let you click on this link, copy
and paste it into your web browser and press return.

Your update reads: <%= raw @update.text %>

Yours,
The FixMyTransport team

Use reporter name in update confirmation email. Warn that it will be public.

Hi<%= raw " #{@update.reporter_name}" %>,

Please click on the link below to confirm the update you just
added to FixMyTransport:

<%= raw @link %>

If your email program does not let you click on this link, copy
and paste it into your web browser and press return.

Your update reads: <%= raw @update.text %>

Your name will be shown on the site as: <%= @update.reporter_name %>

Yours,
The FixMyTransport team


<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %>
 <% if @user.receive_email_alerts %>
  <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>
  <%= hidden_field_tag 'receive_email_alerts', 'false' %>
  <%= submit_tag _("Turn off email alerts") %>
 <% else %>
  <%= _('Items matching the following conditions are currently displayed on your wall.') %>
  <%= hidden_field_tag 'receive_email_alerts', 'true' %>
  <%= submit_tag _("Also send me alerts by email") %>
 <% end %>
<% end %>

Fix "follow" toolbox HTML to be valid 4.01 transitional

<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %>
 <div>
 <% if @user.receive_email_alerts %>
  <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>
  <%= hidden_field_tag 'receive_email_alerts', 'false' %>
  <%= submit_tag _("Turn off email alerts") %>
 <% else %>
  <%= _('Items matching the following conditions are currently displayed on your wall.') %>
  <%= hidden_field_tag 'receive_email_alerts', 'true' %>
  <%= submit_tag _("Also send me alerts by email") %>
 <% end %>
 </div>
<% end %>


<% content_for :action_nav do -%>

<% end %>

<% content_for :sidebar do %>
  <%= render :partial => 'shared_options' %>

Optional settings

    <% fields_for :article do |f| -%>

Format with:

        <select name="article[filters][]" id="article_filters">
        <%= options_for_select(filter_options, (@article.filters || []).first.to_s) %>
      </select>

<%= f.check_box :parse_macros %>Use macro filters

Permanent link:

<%= f.text_field :permalink %>

    <% end -%>

<% end %>

<% content_for :form do -%>
  <%= start_form_tag({:action => 'create'}, {:id => 'article-form'}) %>
<% end -%>

<% fields_for :article do |f| -%>
  <%= render :partial => 'form', :object => f %>

    <%= submit_tag 'Save Article' %> or
    <%= link_to "cancel", :controller => "articles" %>

<% end -%>

Fix an invalid html error


<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%>
<%= help_officers_url %>

<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%>

Add first pass at wording in email footer

<%= _('Write your response as plain text. Only send PDF documents as a last resort. Government guidelines make it clear that PDF is not an acceptable format for you to use in the delivery of government information.') %>
<%= help_officers_url(:anchor => "pdf") %>

<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%>
<%= help_officers_url %>

<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%>


<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %>
<link href='http://fonts.googleapis.com/css?family=Maven+Pro|Actor' rel='stylesheet' type='text/css'>

Add bold version of Maven Pro

<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %>
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700|Actor' rel='stylesheet' type='text/css'>


<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %>
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700|Actor' rel='stylesheet' type='text/css'>

Use ssl connection for fonts when page is secured with ssl

<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %>
<% if request.ssl? %>
<link href='https://fonts.googleapis.com/css?family=Maven+Pro:400,700|Actor' rel='stylesheet' type='text/css'>
<% else %>
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700|Actor' rel='stylesheet' type='text/css'>
<% end %>


<%= update_page_tag { |page| page.replace_html active_scaffold_messages_id, :partial => 'core/messages' } %>
<tr class="inline-adapter" id="<%= nested_id  %>">

    <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{params[:associations] ? params[:associations] : params[:controller]}-view" %> view">
      <a href="" class="inline-adapter-close" title="<%= as_(:close) %>"><%= as_(:close) %>
      <%= payload -%>

Fix close on left handed.

<%= update_page_tag { |page| page.replace_html active_scaffold_messages_id, :partial => 'core/messages' } %>
<tr class="inline-adapter" id="<%= nested_id  %>">

    <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{params[:associations] ? params[:associations] : params[:controller]}-view" %> view">
      <a href="" class="inline-adapter-close" title="<%= as_(:close) %>"><%= as_(:close) unless active_scaffold_config.left_handed %>
      <%= payload -%>


<% form_tag({:action => "signin"}, {:id => "signin_form"}) do %>
    <%= foi_error_messages_for :user_signin %>

If you've used WhatDoTheyKnow before

    Your e-mail:
    <%= text_field 'user_signin', 'email', { :size => 20 } %>

    Password:
    <%= password_field 'user_signin', 'password', { :size => 15 } %>

    <%= link_to "Forgotten your password?", signchange_url + "?pretoken=" + h(params[:token]) %>

    <%= check_box_tag 'remember_me', "1" %>
    Remember me

    <%= hidden_field_tag 'token', params[:token], { :id => 'signin_token' } %>
    <%= submit_tag "Sign in" %>

<% end %>

Add wording to rememeber me box

<% form_tag({:action => "signin"}, {:id => "signin_form"}) do %>
    <%= foi_error_messages_for :user_signin %>

If you've used WhatDoTheyKnow before

    Your e-mail:
    <%= text_field 'user_signin', 'email', { :size => 20 } %>

    Password:
    <%= password_field 'user_signin', 'password', { :size => 15 } %>

    <%= link_to "Forgotten your password?", signchange_url + "?pretoken=" + h(params[:token]) %>

    <%= check_box_tag 'remember_me', "1" %>
    Remember me (keeps you signed in longer;
    do not use on a public computer)

    <%= hidden_field_tag 'token', params[:token], { :id => 'signin_token' } %>
    <%= submit_tag "Sign in" %>

<% end %>


    <%= _('Basic information')%>

    <%= _('Members') %>

      <%= link_to profile.members_count, :controller => 'profile', :action => 'members' %>

  <%= display_field(_('Type:'), profile, :privacy_setting, true) %>

  <%= display_field(_('Location:'), profile, :location, true) %>

    <%= _('Created at:')  %>
    <%= show_date(profile.created_at) %>

  <% if profile.kind_of?(Enterprise) && !profile.environment.enabled?('disable_products_for_enterprises') %>

        <%= link_to _('Products/Services'), :controller => 'catalog', :action => 'index' %>

  <% end %>

    <%= _('Administrators:') %>

      <%= profile.admins.map { |admin| link_to(admin.short_name, admin.url)}.join(', ') %>

  <%= render :partial => 'common' %>

Change text "Created at" on organization's page

    <%= _('Basic information')%>

    <%= _('Members') %>

      <%= link_to profile.members_count, :controller => 'profile', :action => 'members' %>

  <%= display_field(_('Type:'), profile, :privacy_setting, true) %>

  <%= display_field(_('Location:'), profile, :location, true) %>

    <%= _('Profile created at:')  %>
    <%= show_date(profile.created_at) %>

  <% if profile.kind_of?(Enterprise) && !profile.environment.enabled?('disable_products_for_enterprises') %>

        <%= link_to _('Products/Services'), :controller => 'catalog', :action => 'index' %>

  <% end %>

    <%= _('Administrators:') %>

      <%= profile.admins.map { |admin| link_to(admin.short_name, admin.url)}.join(', ') %>

  <%= render :partial => 'common' %>


<% unless (f.object.try(:_delete)) %>
	<% nested_attributes_for f, [:interpretations, :parses, :etymologies, :subentry] %>
	<fieldset class="parse">
		<legend>Parse <%= remove_link_unless_new_record(f) %></legend>

				<%= f.label :parsed_form, nil, :style => "float:left" %>
				<%= headword_link(f.object) unless f.object.nil? || f.object.parsed_form.blank? %>

				<%= f.text_field :parsed_form %>

			<% unless @interpretations ? @interpretations[f.object.parsed_form].blank? : f.object.nil? || f.object.potential_interpretations.blank? %>
				<% @interpretation = f.object.interpretations.empty? ? f.object.interpretations.build : f.object.interpretations %>

				<% f.fields_for :interpretations do |i_form| %>
				  <%= render :partial => 'interpretation', :locals => { :f => i_form } %>
				<% end %>

					<%= link_to 'Add interpretation', '#interpretations', :class => 'add_nested', :rel => '[subentry][etymologies][parses][interpretations]'%>

			<% end %>
	</fieldset>
<% end %>

Fix adding interpretations in lexeme edit (still requires update & continue)

<% unless (f.object.try(:_delete)) %>
	<% nested_attributes_for f, [:interpretations, :parses, :etymology] %>
	<fieldset class="parse">
		<legend>Parse <%= remove_link_unless_new_record(f) %></legend>

				<%= f.label :parsed_form, nil, :style => "float:left" %>
				<%= headword_link(f.object) unless f.object.nil? || f.object.parsed_form.blank? %>

				<%= f.text_field :parsed_form %>

			<% unless @interpretations ? @interpretations[f.object.parsed_form].blank? : f.object.nil? || f.object.potential_interpretations.blank? %>
				<% @interpretation = f.object.interpretations.empty? ? f.object.interpretations.build : f.object.interpretations %>

				<% f.fields_for :interpretations do |i_form| %>
				  <%= render :partial => 'interpretation', :locals => { :f => i_form } %>
				<% end %>

					<%= link_to 'Add interpretation', '#interpretations', :class => 'add_nested', :rel => '[etymology][parses][interpretations]'%>

			<% end %>
	</fieldset>
<% end %>


<%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, ändrad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) -%> sen av <%= user_show_link(@page.updater) -%>

Add link to the latest diff

<%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>,
<% if @page.revision == 1 %>
skapad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) %> sen
<% else%>
<%= link_to "ändrad för #{@page.updated_on.age_in_swedish_words(:minutes => true)} sen",
	revision_diff_url(:id => @page, :new => @page.revision, :old => @page.previous), :title => 'Se skillnaden mot tidigare version' %>
<% end %>
av <%= user_show_link(@page.updater) -%>


<% comment = show %>

      Comment ID #<%= comment.id %> by:
      <%=h comment.commenter %>

      On:
      <%=h comment.written_on %>

        <%=h comment.content %>

Substitute
 for \n in review comments

<% comment = show %>

      Comment ID #<%= comment.id %> by:
      <%=h comment.commenter %>

      On:
      <%=h comment.written_on %>

        <%=(h comment.content).gsub("\n", "
") %>


<% extend CommunityTrackPlugin::TrackHelper %>
<div class="item_card <%= category_class(track_card) %>">
  <a href="<%= url_for track_card.url %>">

      <%= track_card.category_name %>

      <%= image_tag track_card.image.public_filename if track_card.image %>

      <%= track_card.name %>

      <%= track_card_lead(track_card) %>

      <%= "#{track_card.comments_count} comments" %>

      <%= "#{track_card.hits} hits" %>

Fix layout for track card block

<% extend CommunityTrackPlugin::TrackHelper %>
<div class="item_card <%= category_class(track_card) %>">
  <a href="<%= url_for track_card.url %>">

      <%= track_card.category_name %>

      <%= image_tag track_card.image.public_filename if track_card.image %>

      <%= track_card.name %>

      <%= track_card_lead(track_card) %>

      <%= "#{track_card.comments_count}" %>
      <%= _('comments') %>

      <%= "#{track_card.hits}" %>
      <%= _('acessos') %>


  <%= _("Search over

  {{number_of_requests}} requests and

  {{number_of_authorities}} authorities",
  :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %>

<% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %>

    <%= text_field_tag 'query', params[:query], { :size => 30 } %>
    <%= submit_tag _('Search') %>

<% end %>

Use simple form for frontpage search - we don't need parameter insertion as the form is not submitted to this page, we don't need csrf protection and we don't want the extra parameters as we convert this to a get request.

  <%= _("Search over

  {{number_of_requests}} requests and

  {{number_of_authorities}} authorities",
  :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %>

<form id="navigation_search_form" method="post" action="/search">

    <input id="query" type="text" size="30" name="query">
    <input type="submit" value="<%= _('Search') %>">

</form>


Hello! This site really isn't nearly finished yet, but it
    works and so we wanted to start sharing it with you.
    Things still to do:

 Finish designing the site - the current appearance is in flux.

 RSS feeds and email alerts based on search terms.

 Add things you tell us you want.

As always, if you want mySociety to do more stuff like this, please
    volunteer,
    donate,
    or commission us!

Update help notice now alerts finished.

Hello! This site really isn't nearly finished yet, but it
    works and so we wanted to start sharing it with you.
    Things still to do:

 Finish designing the site - this appearance is just placeholder.

 Add things you tell us you want.

As always, if you want mySociety to do more stuff like this, please
    volunteer,
    donate,
    or commission us!


<%= render :file => "#{Rails.root}/app/views/manage_products/_categories_for_selection.rhtml", :locals => {:categories => categories, :level => level} %>

<% javascript_tag do %>
  jQuery(document).ready(function() {

    jQuery('html, body').animate({
      scrollTop: jQuery('#new_product_title').offset().top + jQuery('#cirandas-top-bar').height() -20
    }, 500);
  });
<% end %>


Copy view partial from main alaveteli project

        <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] != 'blog' and params[:action] != 'search' %>"><%= link_to _("Home"), frontpage_url %>

        <li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("Make a request"), select_authority_url, :id => 'make-request-link' %>

        <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("View requests"), request_list_successful_url %>

        <li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default %>

        <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_url %>

        <li class="<%= 'selected' if params[:controller] == 'help' %>"><%= link_to _("Help"), help_about_url %>


<% # TODO: Cache for 5 minutes %>

      <%= render :partial => "frontpage_new_request" %>

        <%= render :partial => "frontpage_search_box" %>

        <%= render :partial => 'frontpage_intro_sentence'  %>

      <%= render :partial => "frontpage_bodies_list" %>
      <%= render :partial => "frontpage_requests_list" %>

Remove leading space - seems to be causing test failures, although not a problem in app itself.

<%# TODO: Cache for 5 minutes %>

      <%= render :partial => "frontpage_new_request" %>

        <%= render :partial => "frontpage_search_box" %>

        <%= render :partial => 'frontpage_intro_sentence'  %>

      <%= render :partial => "frontpage_bodies_list" %>
      <%= render :partial => "frontpage_requests_list" %>


<% if FastGettext.default_available_locales.length > 1 %>

       <% for possible_locale in FastGettext.default_available_locales %>
        <% if possible_locale == I18n.locale.to_s %>
	          <%= locale_name(possible_locale) %>
        <% else %>
          <a href="<%= locale_switcher(possible_locale, params) %>"><%= locale_name(possible_locale) %>
        <% end %>
         <% end %>

     <% end %>

Fix HTML to pass HTML4.01 strict validation during testing


Add product lines template for pagination on session

<%= pagination_links @products %>

  <%= _("Showing %{pcount} products of %{allpcount}") % {:pcount => @products.length, :allpcount => @session.products.count} %>

<% @products.each do |p| %>
  <div id="session-product-<%=p.id%>" class='session-product value-row' toggleedit="distribution.session_product_edit();">
    <%= render :partial => 'distribution_plugin_product/session_edit', :locals => {:p => p} %>

<% end %>
<% javascript_tag do %>
  jQuery(document).ready(function() {distribution.ajaxifyPagination("session-product-lines");});
<% end %>


Add Alaveteli help page with consistent styling with other WDTK help pages.

<% @title = "Making requests" %>

<%= render :partial => 'sidebar' %>

<% if params[:country_name] %>

<%= _("Would you like to see a website like this in your country?") %>

<% else %>

Powered by Alaveteli

<% end %>

This website is powered by Alaveteli.  Alaveteli is free software
for making Freedom of Information requests.  It can easily be
translated into any language, and customised for variations of FOI
law.

The development of Alaveteli is sponsored and supported by a
number of foundations and charities who are interested in
transparency across the world.

If you would like to set up an Alaveteli website in your own
country, we can help.  You will need a few days to get the site
configured and ready to use, and will then have to spend at least an
hour a week moderating and managing the site (more for busy
websites).

Read more on the Alaveteli
website, or drop us an
email.


<% @title = h(@public_body.name) %>

<%=@title%>

A public body in the UK, also called <%= h(@public_body.short_name) %>

<% form_for(:info_request, @info_request, :url => new_request_url, :html => { :id => 'public_body_form' }  ) do |f| %>

   <%= f.hidden_field(:public_body_id, { :value => @public_body.id } ) %>
   <%= submit_tag "Make new FOI request to " + @public_body.short_name %>

<% end %>

<% if @public_body.info_requests.empty? %>

Nobody has made any Freedom of Information requests to this public body using this site.

<% else %>

People have made <%=pluralize(@public_body.info_requests.size, "Freedom of Information request") %> to this public body using this site.

    <%= render :partial => 'request/request_listing', :locals => { :info_requests => @public_body.info_requests.sort { |a,b| b.created_at <=> a.created_at } } %>
<% end %>

Make button on public body page into a link.

<% @title = h(@public_body.name) %>

<%=@title%>

A public body in the UK, also called <%= h(@public_body.short_name) %>

<%= link_to "Make new FOI request to " + @public_body.short_name, new_request_to_body_url(:public_body_id => @public_body.id.to_s)%>

<% if @public_body.info_requests.empty? %>

Nobody has made any Freedom of Information requests to this public body using this site.

<% else %>

People have made <%=pluralize(@public_body.info_requests.size, "Freedom of Information request") %> to this public body using this site.

    <%= render :partial => 'request/request_listing', :locals => { :info_requests => @public_body.info_requests.sort { |a,b| b.created_at <=> a.created_at } } %>
<% end %>


Copy template across from main project ready to be overridden

        <img src="/images/navimg/logo-trans-small.png" alt="<%= site_name %>">

        <%=link_to _("Download original attachment"), @attachment_url %>

(<%=h @attachment.name_of_content_type %>)

    <%= _('This is an HTML version of an attachment to the Freedom of Information request')%>
    '<%=link_to h(@info_request.title), incoming_message_url(@incoming_message)%>'.


Add custom delcious library view which includes Amazon images

    <%=image_tag "http://images.amazon.com/images/P/#{@doc[:asin_text]}.01.MZZZZZZZ" %>

        <%=link_to @doc['title_text'], "http://www.amazon.com/exec/obidos/ASIN/#{@doc[:asin_text]}"%>

      <% @doc.each do |k,v|; highlighting = @response.highlighted(@doc['id'], k) %>

<%=k%>:	<%= highlighting ? "...#{highlighting}..." : (v.respond_to?('join') ? v.join(',') : v.to_s)%>

      <% end %>


<html>
<head>
  <title><%= params[:action] %></title>
  <style>
    <%= yield :style %>
  </style>
</head>
<body>
<%= @content_for_layout %>
</body>
</html>


        <%= link_to 'FYI', frontpage_path, :class => "brand" %>

<%= link_to 'Summary', admin_general_index_path %>

<%= link_to 'Timeline', admin_timeline_path %>

<%= link_to 'Stats', admin_stats_path %>

<%= link_to 'Debug', admin_debug_path %>

<%= link_to 'Authorities', admin_body_list_path %>

<%= link_to 'Requests', admin_request_list_path %>

<%= link_to 'Users', admin_user_list_path %>

<%= link_to 'Tracks', admin_track_list_path %>

<%= link_to 'Log out', signout_path %>


Help pages

<%= link_to_unless_current "Introduction", "/help/about" %>

<%= link_to_unless_current "Making requests", "/help/requesting" %>

<%= link_to_unless_current "Your privacy", "/help/privacy" %>

<%= link_to_unless_current "FOI officers", "/help/officers" %>

<%= link_to_unless_current "About the software", "/help/alaveteli" %>

<%= link_to_unless_current "Credits", "/help/credits" %>

<%= link_to_unless_current "Programmers API", "/help/api" %>

<%= link_to_unless_current "Advanced search", "/search" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
    something about the site, contact us.

Make advanced search link in help sidebar point at advancedsearch rather than search

Help pages

<%= link_to_unless_current "Introduction", "/help/about" %>

<%= link_to_unless_current "Making requests", "/help/requesting" %>

<%= link_to_unless_current "Your privacy", "/help/privacy" %>

<%= link_to_unless_current "FOI officers", "/help/officers" %>

<%= link_to_unless_current "About the software", "/help/alaveteli" %>

<%= link_to_unless_current "Credits", "/help/credits" %>

<%= link_to_unless_current "Programmers API", "/help/api" %>

<%= link_to_unless_current "Advanced search", "/advancedsearch" %>

Contact us

If your question isn't answered here, or you just wanted to let us know
    something about the site, contact us.


Add Google Analytics code, when running in production

<% if RAILS_ENV == 'production' %>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '<%= MySociety::Config.get('GOOGLE_ANALYTICS_KEY', '') %>']);
  _gaq.push(['_setDomainName', 'asktheeu.org']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<% end %>


Replace UK-specific legal snippet with EU law

According to Regulation 1049/2001 the applicant simply has to make a written request in any form, including electronic form. There is no further requirement to give any personal details nor to state reasons for the request.

Article 6.1 of the Regulation says "Applications for access to a document shall be made in any written form, including electronic form, in one of the languages referred to in Article 314 of the EC Treaty and in a sufficiently precise manner to enable the institution to identify the document. The applicant is not     obliged to state reasons for the application."

At the bottom of this page, write a reply to the authority explaining this to them.


<% for t in body.public_body_tags %>
    <% if t.value %>
        <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %>:<%= link_to(h(t.value), main_url(list_public_bodies_url(:tag => t.name_and_value, :only_path => true))) %>
    <% else %>
        <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %>
    <% end %>
    (<a href="<%= admin_url('body/list') %>?query=<%= h(t.name)%>">admin)
<% end %>

Change view to reference new name.

<% for t in body.tags %>
    <% if t.value %>
        <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %>:<%= link_to(h(t.value), main_url(list_public_bodies_url(:tag => t.name_and_value, :only_path => true))) %>
    <% else %>
        <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %>
    <% end %>
    (<a href="<%= admin_url('body/list') %>?query=<%= h(t.name)%>">admin)
<% end %>


Dear <%= @info_request.public_body.name %>,

<%= @outgoing_message.body %>

--

Sent using GovernmentSpy, a project of UKCOD, registered charity number
1076346.  If this is not the correct address for Freedom of Information
requests, please let us know by contacting team@governmentspy and we'll make
sure future ones go to the right place.

Put id as reference for wrong address notifications.

Dear <%= @info_request.public_body.name %>,

<%= @outgoing_message.body %>

--

Sent using GovernmentSpy, a project of UKCOD, registered charity number
1076346. Is <%= @info_request.public_body.request_email%> the wrong
address for Freedom of Information requests to <%=
@info_request.public_body.name%>? If so please let us know by emailing
team@governmentspy quoting reference PB<%= @info_request.public_body.id%>.
We'll make sure future ones go to the right place.


<% if FastGettext.default_available_locales.length > 1 && !params.empty? %>

     <% for possible_locale in FastGettext.default_available_locales %>
      <% if possible_locale == I18n.locale.to_s %>
        <%= locale_name(possible_locale) %>
      <% else %>
        <a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %>
      <% end %>
       <% end %>

 <% end %>

Remove unwanted CSS class from locale switcher


Copy across outgoing email footer from main project

<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%>
<%= help_officers_url %>

<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%>


  <%= link_to _('Are we missing a public authority?', help_requesting_path + '#missing_body') %>

  <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_path %>

Fix closing bracket position - we only want to translate the text, not pass the url as well.

  <%= link_to _('Are we missing a public authority?'), help_requesting_path + '#missing_body' %>

  <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_path %>


Copy user message template from alaveteli to theme


Add a simple template for the AdminController.

<% content_for :sidebar do %>

Termine

<%= link_to "Alle Termine anzeigen", admin_appointments_path %>

<%= link_to "Neuen Termin eintragen", new_admin_appointment_path %>

<% end %>

Willkommen im Admin-Bereich des elektronischen Schwarzen Bretts!


<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %>
 <% if @user.receive_email_alerts %>
  <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>
  <%= hidden_field_tag 'receive_email_alerts', 'false' %>
  <%= submit_tag _("Turn off email alerts") %>
 <% else %>
  <%= _('Items matching the following conditions are currently displayed on your wall.') %>
  <%= hidden_field_tag 'receive_email_alerts', 'true' %>
  <%= submit_tag _("Also send me alerts by email") %>
 <% end %>
<% end %>

Fix "follow" toolbox HTML to be valid 4.01 transitional

<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %>
 <div>
 <% if @user.receive_email_alerts %>
  <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>
  <%= hidden_field_tag 'receive_email_alerts', 'false' %>
  <%= submit_tag _("Turn off email alerts") %>
 <% else %>
  <%= _('Items matching the following conditions are currently displayed on your wall.') %>
  <%= hidden_field_tag 'receive_email_alerts', 'true' %>
  <%= submit_tag _("Also send me alerts by email") %>
 <% end %>
 </div>
<% end %>


Add the Piwik analytics code, that was formerly in the main Alaveteli code, to our theme.

<% if MySociety::Config.get("DOMAIN", '127.0.0.1:3000') == 'www.whatdotheyknow.com'  %>

<% end %>


<!DOCTYPE html PUBLIC "-//w3c//dtd XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">

  <title>Typo admin: <%= controller.controller_name %></title>
  <%= stylesheet_link_tag "admin.css" %>

<%= link_to "Typo admin (#{config['blog_name']})", "/admin/" %>

    <%= current_user_notice %>

<%= link_to_section "General", :controller=>"/admin/general"%>

<%= link_to_section "Articles", :controller=>"/admin/content"%>

<%= link_to_section "Users", :controller=>"/admin/users"%>

    <%= render_flash %>

  <%= @content_for_layout %>

Add nil rescues around helper functions not available to account controller (need a better way for this though)

<!DOCTYPE html PUBLIC "-//w3c//dtd XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">

  <title>Typo admin: <%= controller.controller_name %></title>
  <%= stylesheet_link_tag "admin.css" %>

<%= link_to "Typo admin (#{config['blog_name']})", "/admin/" %>

    <%= current_user_notice rescue nil %>

<%= link_to_section "General", :controller=>"/admin/general" rescue nil %>

<%= link_to_section "Articles", :controller=>"/admin/content" rescue nil %>

<%= link_to_section "Users", :controller=>"/admin/users" rescue nil %>

    <%= render_flash rescue nil %>

  <%= @content_for_layout %>


<%= search_page_title( @titles[:events], @category ) %>

<%= render :partial => 'events/agenda' %>

Fix for event search view's title

<%= search_page_title( Environment.default.name + "'s " + @titles[:events], @category ) %>

<%= render :partial => 'events/agenda' %>


Use your Right to Know

As a european citizen you can ask for information.  By law, they have to respond.  <a href="<%= help_about_url %>">Find out more about freedom of information.


    <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_url %>
|  <a href="https://twitter.com/<%= Configuration::twitter_username %>"><%= _("Follow us on twitter") %>
<%= render :partial => 'general/credits' %>


package unreal;

extern class AController_Extra {
  public function PawnPendingDestroy(inPawn:APawn) : Void;

  @:thisConst
  public function GetCharacter() : ACharacter;

  @:thisConst
  public function GetPawn() : APawn;

  public function ChangeState(newState:FName) : Void;
  @:thisConst
  public function IsInState(state:FName) : Bool;
  @:thisConst
  public function GetStateName() : FName;

  /**
   * Called from game mode upon end of the game, used to transition to proper state.
   * @param EndGameFocus Actor to set as the view target on end game
   * @param bIsWinner true if this controller is on winning team
   */
  public function GameHasEnded(EndGameFocus:AActor /* = NULL */, bIsWinner:Bool /* = false */) : Void;

	/**
	 * Returns Player's Point of View
	 * For the AI this means the Pawn's 'Eyes' ViewPoint
	 * For a Human player, this means the Camera's ViewPoint
	 *
	 * @output	out_Location, view location of player
	 * @output	out_rotation, view rotation of player
	*/
  @:thisConst
  function GetPlayerViewPoint(out_Location:PRef<FVector>, out_Rotation:PRef<FRotator>) : Void;

}

Update to latest perforce change

package unreal;

extern class AController_Extra {
  public function PawnPendingDestroy(inPawn:APawn) : Void;

  @:thisConst
  public function GetCharacter() : ACharacter;

  @:thisConst
  public function GetPawn() : APawn;

  public function ChangeState(newState:FName) : Void;
  @:thisConst
  public function IsInState(state:FName) : Bool;
  @:thisConst
  public function GetStateName() : FName;

  /** spawns and initializes the PlayerState for this Controller */
  public function InitPlayerState() : Void;

  /**
   * Called from game mode upon end of the game, used to transition to proper state.
   * @param EndGameFocus Actor to set as the view target on end game
   * @param bIsWinner true if this controller is on winning team
   */
  public function GameHasEnded(EndGameFocus:AActor /* = NULL */, bIsWinner:Bool /* = false */) : Void;

	/**
	 * Returns Player's Point of View
	 * For the AI this means the Pawn's 'Eyes' ViewPoint
	 * For a Human player, this means the Camera's ViewPoint
	 *
	 * @output	out_Location, view location of player
	 * @output	out_rotation, view rotation of player
	*/
  @:thisConst
  function GetPlayerViewPoint(out_Location:PRef<FVector>, out_Rotation:PRef<FRotator>) : Void;

}


package unreal;

@:glueCppIncludes("Delegates/IDelegateInstance.h")
@:uextern extern class FDelegateHandle {
  function new();
}

Update to latest perforce change

package unreal;

@:glueCppIncludes("Delegates/IDelegateInstance.h")
@:uextern extern class FDelegateHandle {
  function new();

  public function IsValid() : Bool;
  public function Reset() : Void;
}


package unreal;

@:glueCppIncludes("Engine/GameViewportClient.h")
@:uextern extern class UGameViewportClient_Extra extends unreal.UScriptViewportClient {

  public var Viewport : PPtr<FViewport>;

  public var EngineShowFlags : FEngineShowFlags;

  public function PostRender(Canvas:UCanvas) : Void;

  @:thisConst
  public function GetViewportSize( ViewportSize:FVector2D ) : Void;

  /**
    Controls suppression of the blue transition text messages
   **/
  public function SetSuppressTransitionMessage( suppress:Bool ) : Void;
}

Update to latest perforce change

package unreal;

@:glueCppIncludes("Engine/GameViewportClient.h")
@:uextern extern class UGameViewportClient_Extra extends unreal.UScriptViewportClient {

  public var Viewport : PPtr<FViewport>;

  public var EngineShowFlags : FEngineShowFlags;

  public function PostRender(Canvas:UCanvas) : Void;

  @:thisConst
  public function GetViewportSize( ViewportSize:FVector2D ) : Void;

  /**
    Controls suppression of the blue transition text messages
   **/
  public function SetSuppressTransitionMessage( suppress:Bool ) : Void;

  public function IsFocused(Viewport:PPtr<FViewport>) : Bool;
  public function ReceivedFocus(Viewport:PPtr<FViewport>) : Void;
  public function LostFocus(Viewport:PPtr<FViewport>) : Void;
}


package mapviewer.worker;
import js.html.Uint8Array;
import js.html.WorkerContext;
import mapviewer.block.BlockRegistry;
import mapviewer.logging.Logger;
import mapviewer.Main;
import mapviewer.model.Model;

class WorkerMain {

	public static var self : Dynamic = untyped __js__("self");

    static function main() {
		untyped importScripts("gl-matrix-min.js");
		Logger.CAN_LOG = false;
		Main.world = new WorkerWorld();

		self.onmessage = function(msg : Dynamic) {
			switch (msg.data.type) {
				case "models":
					var mJs = msg.data.data;
					for (k in Reflect.fields(mJs)) {
						var model = new Model();
						model.fromMap(Reflect.field(mJs, k));
						Model.models[k] = model;
					}
					BlockRegistry.init();
					self.postMessage("ready");
				case "load":
					if (msg.data.sendBack) {
						Main.world.addChunk(new WorkerChunk(new Uint8Array(msg.data.data)));
					} else {
						var chunk = new WorkerChunk(new Uint8Array(msg.data.data));
						chunk.send();
						Main.world.addChunk(chunk);
					}
				case "remove":
					Main.world.removeChunk(msg.data.x, msg.data.z);
			}
		};
	}

	static function __init__() {
		Logger.CAN_LOG = false;
	}
}

Fix sending the same chunk multiple times

package mapviewer.worker;
import js.html.Uint8Array;
import js.html.WorkerContext;
import mapviewer.block.BlockRegistry;
import mapviewer.logging.Logger;
import mapviewer.Main;
import mapviewer.model.Model;

class WorkerMain {

	public static var self : Dynamic = untyped __js__("self");

    static function main() {
		untyped importScripts("gl-matrix-min.js");
		Logger.CAN_LOG = false;
		Main.world = new WorkerWorld();

		self.onmessage = function(msg : Dynamic) {
			switch (msg.data.type) {
				case "models":
					var mJs = msg.data.data;
					for (k in Reflect.fields(mJs)) {
						var model = new Model();
						model.fromMap(Reflect.field(mJs, k));
						Model.models[k] = model;
					}
					BlockRegistry.init();
					self.postMessage("ready");
				case "load":
					if (!msg.data.sendBack) {
						Main.world.addChunk(new WorkerChunk(new Uint8Array(msg.data.data)));
					} else {
						var chunk = new WorkerChunk(new Uint8Array(msg.data.data));
						chunk.send();
						Main.world.addChunk(chunk);
					}
				case "remove":
					Main.world.removeChunk(msg.data.x, msg.data.z);
			}
		};
	}

	static function __init__() {
		Logger.CAN_LOG = false;
	}
}


package cpp.vm;

class Gc
{
   static public function enable(inEnable:Bool) : Void
   {
      untyped __global__.__hxcpp_enable(inEnable);
   }

   static public function run(major:Bool) : Void
   {
      untyped __global__.__hxcpp_collect();
   }

   static public function trace(sought:Class<Dynamic>) : Void
   {
      untyped __global__.__hxcpp_gc_trace(sought);
   }

}

Return the count of traced objects

package cpp.vm;

class Gc
{
   static public function enable(inEnable:Bool) : Void
   {
      untyped __global__.__hxcpp_enable(inEnable);
   }

   static public function run(major:Bool) : Void
   {
      untyped __global__.__hxcpp_collect();
   }

   static public function trace(sought:Class<Dynamic>,printInstances:Bool=true) : Int
   {
      return untyped __global__.__hxcpp_gc_trace(sought,printInstances);
   }

}


package ;

class RunTests {

  static function main() {
    travix.Logger.exit(0); // make sure we exit properly, which is necessary on some targets, e.g. flash & (phantom)js
  }

}

class Example extends coconut.ui.View<{ foo: Int }> {
  function render() '
    <div>{foo}</div>
  ';
}

Make the test do something.

package ;

import js.Browser.*;

class RunTests {

  static function main() {
    travix.Logger.exit(
      try {
        document.body.appendChild(new Example({ foo: 4 }).toElement());
        if (document.querySelector('body>div>h1').innerHTML != '4')
          throw 'test failed';
        0;
      }
      catch (e:Dynamic) {
        travix.Logger.println(Std.string(e));
        500;
      }
    );
  }

}

class Example extends coconut.ui.View<{ foo: Int }> {
  function render() '

{foo}

  ';
}


package unreal.animationbudgetallocator;

extern class USkeletalMeshComponentBudgeted_Extra
{
	/** Updates significance budget if this component has been registered with a AnimationBudgetAllocator */
	public function SetComponentSignificance(Significance:Float32, bNeverSkip:Bool = false, bTickEvenIfNotRendered:Bool = false, bAllowReducedWork:Bool = true, bForceInterpolate:Bool = false) : Void;
}

Update to latest perforce change

package unreal.animationbudgetallocator;

extern class USkeletalMeshComponentBudgeted_Extra
{
	@:thisConst
	public function GetShouldUseActorRenderedFlag() : Bool;

	public function SetShouldUseActorRenderedFlag(value:Bool) : Void;

	/** Updates significance budget if this component has been registered with a AnimationBudgetAllocator */
	public function SetComponentSignificance(Significance:Float32, bNeverSkip:Bool = false, bTickEvenIfNotRendered:Bool = false, bAllowReducedWork:Bool = true, bForceInterpolate:Bool = false) : Void;
}


package dtx.layout;

using Detox;

interface IDetoxLayout
{
	#if !macro
		/** Updating the title will update the `<title>` element on the page **/
		public var title(default,set):String;

		/** This is a contentContainer that you can empty and fill with new content **/
		public var contentContainer(get,null):DOMCollection;

		/** This is the `<html>` element or the document node.  Used as a workaround until we have a toHtml() method... that we can have in the interface **/
		public var document(get,null):DOMCollection;

		/** This is the `<head>` element on the page.  We append stylesheets to this. **/
		public var head(get,null):DOMCollection;

		/** This is the `<body>` element on the page.  We insert our scripts _after_ this element. **/
		public var body(get,null):DOMCollection;
	#end
}

@:template("

		<title>$title</title>

$title

")
class DefaultDetoxLayout extends dtx.widget.Widget implements IDetoxLayout {}

Update to layout to reflect widget behaviour

package dtx.layout;

using Detox;

interface IDetoxLayout
{
	#if !macro
		/** Updating the title will update the `<title>` element on the page **/
		public var title(default,set):String;

		/** This is a contentContainer that you can empty and fill with new content **/
		public var contentContainer(get,null):DOMNode;

		/** This is the `<html>` element or the document node.  Used as a workaround until we have a toHtml() method... that we can have in the interface **/
		public var document(get,null):DOMNode;

		/** This is the `<head>` element on the page.  We append stylesheets to this. **/
		public var head(get,null):DOMNode;

		/** This is the `<body>` element on the page.  We insert our scripts _after_ this element. **/
		public var body(get,null):DOMNode;
	#end
}

@:template("

		<title>$title</title>

$title

")
class DefaultDetoxLayout extends dtx.widget.Widget implements IDetoxLayout {}


package ufront.log;

import utest.Assert;
import ufront.log.Message;

class MessageTest
{
	var instance:Message;

	public function new()
	{

	}

	public function beforeClass():Void {}

	public function afterClass():Void {}

	public function setup():Void {}

	public function teardown():Void {}

	public function testExample():Void {
	}
}

Add tests for Message / MessageList

package ufront.log;

import utest.Assert;
import ufront.log.Message;

class MessageTest
{
	public function new()
	{

	}

	public function beforeClass():Void {}

	public function afterClass():Void {}

	public function setup():Void {}

	public function teardown():Void {}

	public function testMessageList():Void {
		var message1 = createMessage( "Hello Theo", Trace );
		var message2 = createMessage( 400, Error );

		var emptyMessageList = new MessageList();
		emptyMessageList.push( message1 );
		emptyMessageList.push( message2 );

		var messageArray1 = [];
		var messageArray2 = [];
		function onMessageFn(m:Message) messageArray2.push(m);
		var messageList = new MessageList( messageArray1, onMessageFn );

		Assert.equals( messageArray1, messageList.messages );
		Assert.equals( onMessageFn, messageList.onMessage );
		messageList.push( message1 );
		Assert.equals( 1, messageArray1.length );
		Assert.equals( 1, messageArray2.length );
		messageList.push( message2 );
		Assert.equals( 2, messageArray1.length );
		Assert.equals( 2, messageArray2.length );
		Assert.equals( "Hello Theo", messageArray1[0].msg );
		Assert.equals( Error, messageArray2[1].type );
	}

	function createMessage( msg:Dynamic, type:MessageType, ?pos:haxe.PosInfos ) {
		return { msg: msg, pos: pos, type: type };
	}
}


using StringTools;
import sys.FileSystem;

// When used with js, name=name on server, path (if present) = source path
class Dependency
{
   public var name:String;
   public var path:String;
   public var baseDir:String;
   public var sourceTree:String;

   public function new(inName:String, inPath:String, inBaseDir:String)
   {
      name = inName;
      path = inPath;
      baseDir = inBaseDir;
   }

   public function getAndroidProject()
   {
      return baseDir +"/" + path;
   }

   public function isAndroidProject()
   {
      return FileSystem.exists( getAndroidProject() + "/project.properties" );
   }

   public function isFramework()
   {
      return name.endsWith(".framework");
   }

   public function isLibrary()
   {
      return name.endsWith(".a");
   }

   public function getFramework()
   {
      return name;
   }

   public function makeUniqueName()
   {
      if (name=="")
         name = "dep" + haxe.crypto.Md5.make(haxe.io.Bytes.ofString(getFilename())).toHex();

      return name;
   }

   public function getFilename()
   {
      // Hmmm
      if (name.endsWith(".a") || name.endsWith(".dll"))
         return baseDir + "/" + path + "/" + name;
      return baseDir + "/" + path;
   }
}

Fix to allow gradle only extensions to work.

using StringTools;
import sys.FileSystem;

// When used with js, name=name on server, path (if present) = source path
class Dependency
{
   public var name:String;
   public var path:String;
   public var baseDir:String;
   public var sourceTree:String;

   public function new(inName:String, inPath:String, inBaseDir:String)
   {
      name = inName;
      path = inPath;
      baseDir = inBaseDir;
   }

   public function getAndroidProject()
   {
      return baseDir +"/" + path;
   }

   public function isAndroidProject()
   {
      var isAnt = FileSystem.exists( getAndroidProject() + "/project.properties" );
      var isGradle = FileSystem.exists( getAndroidProject() + "/build.gradle" );
      return isAnt || isGradle;
   }

   public function isFramework()
   {
      return name.endsWith(".framework");
   }

   public function isLibrary()
   {
      return name.endsWith(".a");
   }

   public function getFramework()
   {
      return name;
   }

   public function makeUniqueName()
   {
      if (name=="")
         name = "dep" + haxe.crypto.Md5.make(haxe.io.Bytes.ofString(getFilename())).toHex();

      return name;
   }

   public function getFilename()
   {
      // Hmmm
      if (name.endsWith(".a") || name.endsWith(".dll"))
         return baseDir + "/" + path + "/" + name;
      return baseDir + "/" + path;
   }
}


package haxepunk.utils;

#if macro
import haxe.macro.Context;

@:dox(hide)
class Platform
{
	static var remap = [
		"haxepunk.input.Input" => "com.haxepunk.utils.Input",
		"haxepunk.input.Key" => "com.haxepunk.utils.Key",
		"haxepunk.input.Gesture" => "com.haxepunk.utils.Gesture",
		"haxepunk.input.Touch" => "com.haxepunk.utils.Touch",
		"haxepunk.utils.Random" => "com.haxepunk.HXP",
		"haxepunk.utils.MathUtil" => "com.haxepunk.HXP",
	];

	static function run()
	{
		Context.onTypeNotFound(function (typeName:String)
		{
			var parts = typeName.split(".");
			if (parts[0] == "com" && parts[1] == "haxepunk")
			{
				var name = parts[parts.length - 1],
					currentPack = parts.slice(1, parts.length - 1),
					deprecatedPack = parts.slice(0, parts.length - 1);
				trace('Warning: the com.haxepunk package is deprecated ($typeName -> ' + currentPack.join(".") + '.$name)');
				return {name: name, pack: deprecatedPack, kind: TDAlias(TPath({name: name, pack: currentPack})), fields: [], pos: Context.currentPos()};
			}
			return null;
		});
	}
}
#end

Remove old type remap from macro.

package haxepunk.utils;

#if macro
import haxe.macro.Context;

@:dox(hide)
class Platform
{
	static function run()
	{
		Context.onTypeNotFound(function (typeName:String)
		{
			var parts = typeName.split(".");
			if (parts[0] == "com" && parts[1] == "haxepunk")
			{
				var name = parts[parts.length - 1],
					currentPack = parts.slice(1, parts.length - 1),
					deprecatedPack = parts.slice(0, parts.length - 1);
				trace('Warning: the com.haxepunk package is deprecated ($typeName -> ' + currentPack.join(".") + '.$name)');
				return {name: name, pack: deprecatedPack, kind: TDAlias(TPath({name: name, pack: currentPack})), fields: [], pos: Context.currentPos()};
			}
			return null;
		});
	}
}
#end


package unreal;

extern class UGameplayStatics_Extra {
}

Update to latest perforce change

package unreal;

extern class UGameplayStatics_Extra {
	@:ufunction(BlueprintCallable) @:uname("PlaySoundAtLocation")
	static public function PlaySoundAtLocationWithOwner(WorldContextObject : unreal.Const<unreal.UObject>, Sound : unreal.USoundBase, Location : unreal.FVector, Rotation : unreal.FRotator, VolumeMultiplier : unreal.Float32 = 1.000000, PitchMultiplier : unreal.Float32 = 1.000000, StartTime : unreal.Float32 = 0.000000, AttenuationSettings : unreal.USoundAttenuation, ConcurrencySettings : unreal.USoundConcurrency, OwningActor : unreal.AActor) : Void;
}


package flixel.group;

/**
 * Iterator implementation for groups
 * Support a filter method (used for iteratorAlive, iteratorDead and iteratorExists)
 * @author Masadow
 */
class FlxTypedGroupIterator<T>
{
	private var _groupMembers : Array<T>;
	private var _cursor : Int;
	private var _filter : T -> Bool;

	public function new(GroupMembers : Array<T>, filter : T -> Bool = null)
	{
		_groupMembers = GroupMembers;
		_cursor = 0;
		_filter = filter;
	}

	public function next()
	{
		return hasNext() ? _groupMembers[_cursor++] : null;
	}

	public function hasNext() : Bool
	{
		while (_cursor < _groupMembers.length && _filter != null && !_filter(_groupMembers[_cursor]))
		{
			_cursor++;
		}
		return _cursor < _groupMembers.length;
	}

}

Fix bug: You couldn't iterate over an element that had called remove without slice

package flixel.group;

/**
 * Iterator implementation for groups
 * Support a filter method (used for iteratorAlive, iteratorDead and iteratorExists)
 * @author Masadow
 */
class FlxTypedGroupIterator<T>
{
	private var _groupMembers : Array<T>;
	private var _cursor : Int;
	private var _filter : T -> Bool;

	public function new(GroupMembers : Array<T>, filter : T -> Bool = null)
	{
		_groupMembers = GroupMembers;
		_cursor = 0;
		_filter = filter;
	}

	public function next()
	{
		return hasNext() ? _groupMembers[_cursor++] : null;
	}

	public function hasNext() : Bool
	{
		while (_cursor < _groupMembers.length && (_groupMembers[_cursor] == null || _filter != null && !_filter(_groupMembers[_cursor])))
		{
			_cursor++;
		}
		return _cursor < _groupMembers.length;
	}

}


package flash.events; #if (!display && flash)

extern class ProgressEvent extends Event {

	public static var PROGRESS (default, never):String;
	public static var SOCKET_DATA (default, never):String;
	public var bytesLoaded:Float;
	public var bytesTotal:Float;

	#if (flash && air)
	static var STANDARD_OUTPUT_DATA : String;
	#end

	public function new (type:String, bubbles:Bool = false, cancelable:Bool = false, bytesLoaded:Float = 0, bytesTotal:Float = 0);

}

#else
typedef ProgressEvent = openfl.events.ProgressEvent;
#end

Add some missing air progress events

package flash.events; #if (!display && flash)

extern class ProgressEvent extends Event {

	public static var PROGRESS (default, never):String;
	public static var SOCKET_DATA (default, never):String;
	public var bytesLoaded:Float;
	public var bytesTotal:Float;

	#if (flash && air)
	public static var STANDARD_ERROR_DATA : String;
	public static var STANDARD_INPUT_PROGRESS : String;
	public static var STANDARD_OUTPUT_DATA : String;
	#end

	public function new (type:String, bubbles:Bool = false, cancelable:Bool = false, bytesLoaded:Float = 0, bytesTotal:Float = 0);

}

#else
typedef ProgressEvent = openfl.events.ProgressEvent;
#end


import flash.Lib;

class Sample
{

public static function main()
{
   var text = new flash.text.TextField();
   text.x = 10;
   text.y = 10;
   text.text = "Hello !";
   Lib.current.stage.addChild(text);
   text.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;

   var text = new flash.text.TextField();
   text.x = 10;
   text.y = 30;
   text.htmlText = "Hello !";
   Lib.current.stage.addChild(text);

   var text = new flash.text.TextField();
   text.x = 10;
   text.y = 50;
   text.htmlText = "Hello !";
   Lib.current.stage.addChild(text);

   var text = new flash.text.TextField();
   text.x = 10;
   text.y = 80;
   text.htmlText = "Hello !";
   Lib.current.stage.addChild(text);
}

}

Add black and white versions

import flash.Lib;

class Sample
{

public static function main()
{
   var gfx = Lib.current.graphics;
   gfx.beginFill(0x000000);
   gfx.drawRect(120,0,120,120);

   for(side in 0...2)
   {
      var col = side * 0xffffff;
      var text = new flash.text.TextField();
      text.x = 10 + side*120;
      text.y = 10;
      text.textColor = col;
      text.text = "Hello !";
      Lib.current.addChild(text);
      text.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;

      var text = new flash.text.TextField();
      text.x = 10 + side*120;
      text.y = 30;
      text.textColor = col;
      text.htmlText = "Hello !";
      Lib.current.addChild(text);

      var text = new flash.text.TextField();
      text.x = 10 + side*120;
      text.y = 50;
      text.textColor = col;
      text.htmlText = "Hello !";
      Lib.current.addChild(text);

      var text = new flash.text.TextField();
      text.x = 10 + side*120;
      text.y = 80;
      text.textColor = col;
      text.htmlText = "Hello !";
      Lib.current.addChild(text);
   }
}

}


package cases;

class Implicits extends Base {

  public function test() {
    mount(hxx('<Example ref=${e -> asserts.assert(e.foo.value == 123)}/>'));
    mount(hxx('<Example2 ref=${e -> asserts.assert(e.foo.value == 42)}/>'));
    return asserts.done();
  }
}

private class Example extends View {
  @:implicit var foo:Foo = new Foo(123);
  function render() '

${foo.value}

  ';
}

private class Example2 extends View {
  @:implicit var foo:Foo;
  function render() '

${foo.value}

  ';
}

@:default(cases.Foo.ANSWER)
class Foo {
  static public final ANSWER = new Foo(42);
  public final value:Int;
  public function new(value:Int)
    this.value = value;
}

Add failing test for local implicits.

package cases;

class Implicits extends Base {

  public function test() {
    mount(hxx('<Example ref=${e -> asserts.assert(e.foo.value == 123)}/>'));
    mount(hxx('<Example2 ref=${e -> asserts.assert(e.foo.value == 42)}/>'));
    mount(hxx('
      <Implicit defaults=${[ Foo => new Foo(1337) ]}>
        <Example ref=${e -> asserts.assert(e.foo.value == 1337)}/>
      </Implicit>
    '));
    return asserts.done();
  }
}

private class Example extends View {
  @:implicit var foo:Foo = new Foo(123);
  function render() '

${foo.value}

  ';
}

private class Example2 extends View {
  @:implicit var foo:Foo;
  function render() '

${foo.value}

  ';
}

@:default(cases.Foo.ANSWER)
class Foo {
  static public final ANSWER = new Foo(42);
  public final value:Int;
  public function new(value:Int)
    this.value = value;
}


package tinx.node.mongo;

import tink.core.types.Outcome;
import tinx.node.Error;
import tinx.node.Runtime;

@:native('require("mongodb").ObjectID')
private extern class Native {
	function new(?s:String);
	function toString():String;
}
abstract ObjectID<T:{}>(Native) {
	public function new(?s:String) this = new Native(s);
	@:to public function toString():String return this.toString();
	static public function parse<A:{}>(s:String):Outcome<ObjectID<A>, Error> {
		try {
			return Success(new ObjectID(s));
		}
		catch (e:Dynamic)
			return Failure(e);
	}
	@:to public function toDate():Date {
		return Date.fromTime((untyped parseInt)(this.toString().substr(0,8), 16)*1000);
	}
}

Add comparison for object id.

package tinx.node.mongo;

import tink.core.types.Outcome;
import tinx.node.Error;
import tinx.node.Runtime;

@:native('require("mongodb").ObjectID')
private extern class Native {
	function new(?s:String);
	function toString():String;
}
abstract ObjectID<T:{}>(Native) {
	public function new(?s:String) this = new Native(s);
	@:to public function toString():String return this.toString();
	static public function parse<A:{}>(s:String):Outcome<ObjectID<A>, Error> {
		try {
			return Success(new ObjectID(s));
		}
		catch (e:Dynamic)
			return Failure(e);
	}

	@:op(a == b) static public function eq<A:{}>(a:ObjectID<A>, b:ObjectID<A>)
		return a.toString() == b.toString();

	@:op(a != b) static public function neq<A:{}>(a:ObjectID<A>, b:ObjectID<A>)
		return !(a == b);

	@:to public function toDate():Date {
		return Date.fromTime((untyped parseInt)(this.toString().substr(0,8), 16)*1000);
	}
}


package travix.commands;

import tink.cli.Rest;

using sys.FileSystem;

class JavaCommand extends Command {

  public function install() {

  }

  public function buildAndRun(rest:Rest<String>) {
    var main = Travix.getMainClassLocalName();

    installLib('hxjava');

    build('java', ['-java', 'bin/java'].concat(rest), function () {
      withCwd('bin/java', function() {
        if('.buckconfig'.exists()) {
          exec('buck', ['build', ':run']);
          exec('buck', ['run', ':run']);
        } else {
          var outputFile = main + (isDebugBuild(rest) ? '-Debug' : '');
          exec('java', ['-jar', '$outputFile.jar']);
        }
      });
    });
  }
}

Fix "Uncaught exception - [file_contents,extraParams.hxml]" Java builds

package travix.commands;

import tink.cli.Rest;

using sys.FileSystem;

class JavaCommand extends Command {

  public function install() {

  }

  public function buildAndRun(rest:Rest<String>) {
    var main = Travix.getMainClassLocalName();

    installLib('hxjava');

    build('java', ['-java', 'bin/java'].concat(rest), function () {
      // must be executed while in project root, i.e. outside withCwd('bin/java')
      var isDebugBuild = isDebugBuild(rest);

      withCwd('bin/java', function() {
        if('.buckconfig'.exists()) {
          exec('buck', ['build', ':run']);
          exec('buck', ['run', ':run']);
        } else {
          var outputFile = main + (isDebugBuild ? '-Debug' : '');
          exec('java', ['-jar', '$outputFile.jar']);
        }
      });
    });
  }
}


//
// Flambe - Rapid game development
// https://github.com/aduros/flambe/blob/master/LICENSE.txt

package flambe.platform.flash;

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.Lib;

import flambe.display.DrawingContext;
import flambe.display.Texture;

class BitmapRenderer
    implements Renderer
{
    public function new ()
    {
        var stage = Lib.current.stage;

        _bitmap = new Bitmap();
        stage.addChild(_bitmap);

        stage.addEventListener(Event.RESIZE, onResize);
        onResize(null);
    }

    public function uploadTexture (texture :Texture)
    {
        // Nothing
    }

    public function willRender () :DrawingContext
    {
        _screen.lock();
        return _drawCtx;
    }

    public function didRender ()
    {
        _screen.unlock();
    }

    private function onResize (_)
    {
        if (_screen != null) {
            _screen.dispose();
        }
        _screen = new BitmapData(_bitmap.stage.stageWidth, _bitmap.stage.stageWidth, false);
        _drawCtx = new BitmapDrawingContext(_screen);
        _bitmap.bitmapData = _screen;
    }

    private var _screen :BitmapData;
    private var _bitmap :Bitmap;
    private var _drawCtx :DrawingContext;
}

Fix for an old IE Flash bug.

//
// Flambe - Rapid game development
// https://github.com/aduros/flambe/blob/master/LICENSE.txt

package flambe.platform.flash;

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.Lib;

import flambe.display.DrawingContext;
import flambe.display.Texture;

class BitmapRenderer
    implements Renderer
{
    public function new ()
    {
        var stage = Lib.current.stage;

        _bitmap = new Bitmap();
        stage.addChild(_bitmap);

        stage.addEventListener(Event.RESIZE, onResize);
        onResize(null);
    }

    public function uploadTexture (texture :Texture)
    {
        // Nothing
    }

    public function willRender () :DrawingContext
    {
        _screen.lock();
        return _drawCtx;
    }

    public function didRender ()
    {
        _screen.unlock();
    }

    private function onResize (_)
    {
        if (_screen != null) {
            _screen.dispose();
        }

        var width = _bitmap.stage.stageWidth;
        var height = _bitmap.stage.stageHeight;
        if (width == 0 || height == 0) {
            // In IE, stageWidth and height may initialized to zero! A resize event will come in
            // after a couple frames to give us the real dimensions, use a fixed size until then.
            // http://jodieorourke.com/view.php?id=79&blog=news
            width = height = 100;
        }

        _screen = new BitmapData(width, height, false);
        _drawCtx = new BitmapDrawingContext(_screen);
        _bitmap.bitmapData = _screen;
    }

    private var _screen :BitmapData;
    private var _bitmap :Bitmap;
    private var _drawCtx :DrawingContext;
}


import com.haxepunk.utils.HaxelibInfo;

class Setup
{
	public static function setup()
	{
		installDependencies();
		Sys.command('haxelib run $OPENFL setup');
	}

	public static function update()
	{
		Sys.command("haxelib update HaxePunk");
		installDependencies();
	}

	public static function installDependencies()
	{
		for (field in Reflect.fields(HaxelibInfo.install))
		{
			Sys.command("haxelib install " + field + " " + Reflect.field(HaxelibInfo.install, field));
		}
	}

	private static inline var OPENFL = "lime";
}

Fix command call in setup tool

import com.haxepunk.utils.HaxelibInfo;

class Setup
{
	public static function setup()
	{
		installDependencies();
		Sys.command("haxelib", ["run", OPENFL, "setup"]);
	}

	public static function update()
	{
		Sys.command("haxelib" ["update", "HaxePunk"]);
		installDependencies();
	}

	public static function installDependencies()
	{
		for (field in Reflect.fields(HaxelibInfo.install))
		{
			Sys.command("haxelib" ["install", field, Reflect.field(HaxelibInfo.install, field)]);
		}
	}

	private static inline var OPENFL = "lime";
}


package;

import kha.Framebuffer;
import kha.Scheduler;
import kha.System;
import kha.math.Vector2;
import verlet.Objects.Tire;
import verlet.Verlet;
import verlet.Renderer;
import verlet.collision.Shapes;

class Project {
	var world:Verlet;
	var verletRenderer:Renderer;

	public function new() {
		System.notifyOnRender(render);
		Scheduler.addTimeTask(update, 0, 1 / 60);
		world = new Verlet(800, 600);
		// Render Verlet world
		verletRenderer = Renderer.Instance;

		// Entities
		new Tire(new Vector2(500,32), 64, 32, .05, .5);

		// Colliders
		new Circle(new Vector2(222, 200), 256);
		new Circle(new Vector2(666, 300), 128);
		new Circle(new Vector2(400, 600), 128);
		new Box(new Vector2(222, 200), 256, 80);
	}

	function update(): Void {

		world.update(10);
	}

	function render(framebuffer: Framebuffer): Void {
		var graphics = framebuffer.g2;
		graphics.begin();
		verletRenderer.render(graphics);
		graphics.end();
	}
}

Move Box out of way

package;

import kha.Framebuffer;
import kha.Scheduler;
import kha.System;
import kha.math.Vector2;
import verlet.Objects.Tire;
import verlet.Verlet;
import verlet.Renderer;
import verlet.collision.Shapes;

class Project {
	var world:Verlet;
	var verletRenderer:Renderer;

	public function new() {
		System.notifyOnRender(render);
		Scheduler.addTimeTask(update, 0, 1 / 60);
		world = new Verlet(800, 600);
		// Render Verlet world
		verletRenderer = Renderer.Instance;

		// Entities
		new Tire(new Vector2(500,32), 64, 32, .05, .5);

		// Colliders
		new Circle(new Vector2(222, 200), 256);
		new Circle(new Vector2(666, 300), 128);
		new Circle(new Vector2(400, 600), 128);
		new Box(new Vector2(200, 200), 256, 80);
	}

	function update(): Void {

		world.update(10);
	}

	function render(framebuffer: Framebuffer): Void {
		var graphics = framebuffer.g2;
		graphics.begin();
		verletRenderer.render(graphics);
		graphics.end();
	}
}


package npm.sequelize;

import haxe.extern.EitherType;

typedef ModelQuery = {
  ?where : {},
  ?attributes : Array<String>,
  ?paranoid : Bool,
  ?include : Array<EitherType<Model<Dynamic>, ModelIncludeOptions>>,
  ?order : EitherType<String, EitherType<Array<String>, EitherType<Array<Array<Dynamic>>, SequelizeFunction>>>,
  ?limit : Int,
  ?offset : Int,
  ?transaction : Transaction
}

Switch order of types in modelquery

package npm.sequelize;

import haxe.extern.EitherType;

typedef ModelQuery = {
  ?where : {},
  ?attributes : Array<String>,
  ?paranoid : Bool,
  ?include : Array<EitherType<ModelIncludeOptions, Model<Dynamic>>>,
  ?order : EitherType<String, EitherType<Array<String>, EitherType<Array<Array<Dynamic>>, SequelizeFunction>>>,
  ?limit : Int,
  ?offset : Int,
  ?transaction : Transaction
}


package h3d.shader.pbr;

class ToneMapping extends ScreenShader {

	static var SRC = {

		@param var hdrTexture : Sampler2D;
		@param var exposureExp : Float;
		@const var isSRBG : Bool;
		@const var mode : Int;

		var hdrColor : Vec4;

		function __init__fragment() {
			hdrColor = hdrTexture.get(calculatedUV);
		}

		function fragment() {
			var color = hdrColor;
			color.rgb *= exposureExp;
			switch( mode ) {
			case 0:
				// linear
			case 1:
				// reinhard
				color.rgb = color.rgb / (color.rgb + vec3(1.));
			}
			// gamma correct
			if( !isSRBG )
				color.rgb = color.rgb.sqrt();
			pixelColor = color;
		}
	}

	public var exposure(default,set) : Float;

	public function new() {
		super();
		exposure = 0;
	}

	function set_exposure(v) {
		exposureExp = Math.exp(v);
		return exposure = v;
	}

}

Update Tonemap, add saturate() for linear

package h3d.shader.pbr;

class ToneMapping extends ScreenShader {

	static var SRC = {

		@param var hdrTexture : Sampler2D;
		@param var exposureExp : Float;
		@const var isSRBG : Bool;
		@const var mode : Int;

		var hdrColor : Vec4;

		function __init__fragment() {
			hdrColor = hdrTexture.get(calculatedUV);
		}

		function fragment() {
			var color = hdrColor;
			color.rgb *= exposureExp;
			switch( mode ) {
			case 0:
				// linear
				color.rgb = color.rgb.saturate();
			case 1:
				// reinhard
				color.rgb = color.rgb / (color.rgb + vec3(1.));
			}
			// gamma correct
			if( !isSRBG )
				color.rgb = color.rgb.sqrt();
			pixelColor = color;
		}
	}

	public var exposure(default,set) : Float;

	public function new() {
		super();
		exposure = 0;
	}

	function set_exposure(v) {
		exposureExp = Math.exp(v);
		return exposure = v;
	}

}


package unreal.onlinesubsystem;

import unreal.*;

@:glueCppIncludes("Online.h") @:umodule("OnlineSubsystem")
@:uname("IOnlineSubsystem")
@:noCopy
@:uextern extern class IOnlineSubsystem {
  public static function Get(subsystemName:FName) : unreal.PPtr<IOnlineSubsystem>;

  public function GetAchievementsInterface() : unreal.TThreadSafeSharedPtr<IOnlineAchievements>;
  public function GetLeaderboardsInterface() : unreal.TThreadSafeSharedPtr<IOnlineLeaderboards>;
  public function GetIdentityInterface() : unreal.TThreadSafeSharedPtr<IOnlineIdentity>;
  public function GetInstanceName() : FName;

  public function GetLanguage() : FString;
}

Support for checking if Steam controller is active in Haxe code

package unreal.onlinesubsystem;

import unreal.*;

@:glueCppIncludes("Online.h") @:umodule("OnlineSubsystem")
@:uname("IOnlineSubsystem")
@:noCopy
@:uextern extern class IOnlineSubsystem {
  public static function Get(subsystemName:FName) : unreal.PPtr<IOnlineSubsystem>;

  public function GetAchievementsInterface() : unreal.TThreadSafeSharedPtr<IOnlineAchievements>;
  public function GetLeaderboardsInterface() : unreal.TThreadSafeSharedPtr<IOnlineLeaderboards>;
  public function GetIdentityInterface() : unreal.TThreadSafeSharedPtr<IOnlineIdentity>;
  public function GetInstanceName() : FName;

  public function GetLanguage() : FString;
  public function IsSteamControllerActive() : Bool;
}


package unreal.umg;

@:glueCppIncludes("Components/RichTextBlock.h")
extern class URichTextBlock_Extra
{
	private function UpdateStyleData() : Void;
}

Update to latest perforce change

package unreal.umg;

@:glueCppIncludes("Components/RichTextBlock.h")
extern class URichTextBlock_Extra
{
	private function UpdateStyleData() : Void;
	@:expr({ return this.Text.copy(); }) public function GetText():FText;
}


package extension.locale;

class Locale {

	private static var _getLangCode:Void->String =
		#if android
			openfl.utils.JNI.createStaticMethod("localeExtension/Locale", "getLangCode", "()Ljava/lang/String;");
		#elseif ios
			cpp.Lib.load("openflLocaleExtension","get_lang_code",0);
		#elseif (flash || openfl)
			function():String return flash.system.Capabilities.language;
		#else
			function():String return null;
		#end

	public static function getLangCode():String{
		var res:String=_getLangCode();
		if (res==null) return null;
		return StringTools.replace(res,'_','-');
	}

}

Add getSmartLangCode() function (to provide lang code as flash protocol: two letters unless Chinese)

package extension.locale;

class Locale {

	private static var _getLangCode:Void->String =
		#if android
			openfl.utils.JNI.createStaticMethod("localeExtension/Locale", "getLangCode", "()Ljava/lang/String;");
		#elseif ios
			cpp.Lib.load("openflLocaleExtension","get_lang_code",0);
		#elseif (flash || openfl)
			function():String return flash.system.Capabilities.language;
		#else
			function():String return 'en';
		#end

	public static function getLangCode():String{
		return StringTools.replace(_getLangCode(),'_','-');
	}

	public static function getSmartLangCode():String {
		var lang=getLangCode().toLowerCase().substring(0,7);
		if(lang.substring(0,2)=='zh'){
			if(lang=='zh-hans' || lang=='zh-cn' || lang=='zh-sg' || lang=='zh-my' || lang=='zh-rcn' || lang=='zh-rsg' || lang=='zh-rmy'){
				return 'zh-hans';
			}
			return 'zh-hant';
		}
		return lang.substring(0,2);
	}

}


package nme.display;

import nme.display.DisplayObject;
import nme.display.PixelSnapping;

class Bitmap extends DisplayObject {
   public var bitmapData(default,nmeSetBitmapData) : BitmapData;
   public var pixelSnapping : PixelSnapping;
   public var smoothing : Bool;

   var mGraphics:Graphics;

   public function new(?inBitmapData : BitmapData, ?inPixelSnapping : PixelSnapping, ?inSmoothing : Bool) : Void {
         super(DisplayObject.nme_create_display_object(),"Bitmap");
         pixelSnapping = inPixelSnapping;
         smoothing = inSmoothing;
         nmeSetBitmapData(inBitmapData);
   }

   function nmeSetBitmapData(inBitmapData:BitmapData) : BitmapData
   {
      var gfx = graphics;
      gfx.clear();
		bitmapData = inBitmapData;
      if (inBitmapData!=null)
      {
         gfx.beginBitmapFill(inBitmapData,false,smoothing);
         gfx.drawRect(0,0,inBitmapData.width,inBitmapData.height);
         gfx.endFill();
      }
      return inBitmapData;
   }

}

Allow smoothing to be set after creation

package nme.display;

import nme.display.DisplayObject;
import nme.display.PixelSnapping;

class Bitmap extends DisplayObject {
   public var bitmapData(default,nmeSetBitmapData) : BitmapData;
   public var pixelSnapping : PixelSnapping;
   public var smoothing(default,nmeSetSmoothing) : Bool;

   var mGraphics:Graphics;

   public function new(?inBitmapData : BitmapData, ?inPixelSnapping : PixelSnapping, ?inSmoothing : Bool) : Void {
         super(DisplayObject.nme_create_display_object(),"Bitmap");
         pixelSnapping = inPixelSnapping;
         smoothing = inSmoothing;
         nmeSetBitmapData(inBitmapData);
   }

   function nmeRebuid()
   {
      var gfx = graphics;
      gfx.clear();
      if (bitmapData!=null)
      {
         gfx.beginBitmapFill(bitmapData,false,smoothing);
         gfx.drawRect(0,0,bitmapData.width,bitmapData.height);
         gfx.endFill();
      }
   }

   function nmeSetSmoothing(inSmooth:Bool) : Bool
   {
      smoothing = inSmooth;
      nmeRebuid();
      return inSmooth;
   }

   function nmeSetBitmapData(inBitmapData:BitmapData) : BitmapData
   {
	  bitmapData = inBitmapData;
     nmeRebuid();
     return inBitmapData;
   }

}


package jive;

import org.aswing.geom.IntDimension;
import org.aswing.geom.IntRectangle;
import format.SVG;

class Svg extends org.aswing.Component {

    public var generateContent:Void -> String;

    /**
    * The content property is ignored if the generateContent function is set.
    **/
    public var content(get, set):String;
    private var _content:String;

    private function get_content():String { return _content; }

    private function set_content(v:String):String {
        _content = v;
        repaint();
        return v;
    }

    public function new() {
        super();
    }

    override private function paint(b:IntRectangle): Void {
        super.paint(b);

        //Draw transparent rectangle to prevent glitches during animations
        graphics.beginFill(0, 0);
        graphics.drawRect(b.x, b.y, b.width, b.height);
        graphics.endFill();

        if (null != generateContent) _content = generateContent();
        new SVG(content).render(graphics);

        trace(b);
        trace(content);
    }

    override public function getPreferredSize(): IntDimension {
        if (null != generateContent) _content = generateContent();
        var data = new SVG(content).data;
        return new IntDimension(Std.int(data.width), Std.int(data.height));
    }
}

Remove traces from the SVG class

package jive;

import org.aswing.geom.IntDimension;
import org.aswing.geom.IntRectangle;
import format.SVG;

class Svg extends org.aswing.Component {

    public var generateContent:Void -> String;

    /**
    * The content property is ignored if the generateContent function is set.
    **/
    public var content(get, set):String;
    private var _content:String;

    private function get_content():String { return _content; }

    private function set_content(v:String):String {
        _content = v;
        repaint();
        return v;
    }

    public function new() {
        super();
    }

    override private function paint(b:IntRectangle): Void {
        super.paint(b);

        //Draw transparent rectangle to prevent glitches during animations
        graphics.beginFill(0, 0);
        graphics.drawRect(b.x, b.y, b.width, b.height);
        graphics.endFill();

        if (null != generateContent) _content = generateContent();
        new SVG(content).render(graphics);
    }

    override public function getPreferredSize(): IntDimension {
        if (null != generateContent) _content = generateContent();
        var data = new SVG(content).data;
        return new IntDimension(Std.int(data.width), Std.int(data.height));
    }
}