disabled white/blacklisting for sharing permissions on JERM uploaded assets

<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

<%# @resource_type -%>
<%# @favourite_groups -%>
<%# @all_projects -%>

<%# @policy_type -%>
<%# @sharing_mode -%>
<%# @access_mode -%>
<%# @use_custom_sharing -%>
<%# @use_whitelist -%>
<%# @use_blacklist -%>

    <%= help_icon("Here you can specify who can view, download and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view, download and edit this <%= @resource_type -%>.
        <%= link_to_function "Click here" + expand_image, visual_effect(:toggle_blind, "more_info", :duration => 0.3) -%> for more information.

          Here you may specify the People, Projects or Groups that may View and Edit the details about your <%= @resource_type -%>.

          You may:

Keep the <%= @resource_type -%> private, and only visible to yourself

Share with all Sysmo project members

Define more fine-grained sharing, by selecting Custom sharing permissions.
 By using custom sharing permissions you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
        <input type="hidden" name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
        <input type="hidden" name="sharing[include_custom_sharing_<%= Policy::PRIVATE -%>]" value="0">

        <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                              value="<%= Policy::PRIVATE -%>" type="radio" onclick="javascript:setSharingElementVisibility(<%= Policy::PRIVATE -%>);" />
        - Keep this <%= @resource_type -%> private.

Or share it with..

      <label for="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_REGISTERED_USERS -%> id="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>" name="sharing[sharing_scope]"
               value="<%= Policy::ALL_REGISTERED_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_REGISTERED_USERS -%>);" />
        - All registered users for

      <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_REGISTERED_USERS,
        :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>

      <%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_REGISTERED_USERS,
        :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

      <label for="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]"
               value="<%= Policy::ALL_SYSMO_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_SYSMO_USERS -%>);" />
        - All users associated with any of the SysMO projects for

      <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
        :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>

      <%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_SYSMO_USERS,
        :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

      <label for="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY -%> id="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" name="sharing[sharing_scope]"
               value="<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>);" />
        - Use custom sharing permissions only

    <div id="specific_sharing" style="display: <%= (@use_custom_sharing || @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY) ? "block" : "none" -%>; margin-top: 2em;">

        Custom sharing permissions

          So far you have selected to share this <%= @resource_type -%> with:

          Loading...

          Build up the list of people and groups to share with.
          Select from the options below and click "Add" to apply
          your choices and add collaborators to your current selection:

            <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
            <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
            Favourite Groups

              <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
              <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

              <%= select_tag "favourite_group_select", f_group_select_options, :onchange => "javascript: replaceFavouriteGroupRedboxActionURL(); return(false);", :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

              <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

              <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit() -%>

              <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new() -%>

            <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
            Projects and Institutions

              <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

              Step 1
              <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

              Step 2
              <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

              Step 3

                <input type="hidden" id="proj_select_step_index" value="1">

                  <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                  Step 1: Select a project
                  <%= select("proj_project", "select",
                    Project.find(:all).collect {|p| [ p.name, p.id ] },
                    {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                  Step 2: Select scope of the project
                  <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                  Step 3: Choose access rights, review and submit

                  <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                    <option value="<%= Policy::VIEWING -%>" >Viewing only</option>
                    <option value="<%= Policy::DOWNLOADING -%>" >Viewing and downloading only</option>
                    <option value="<%= Policy::EDITING -%>" >Viewing, downloading and editing</option>
                  </select>

                    <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                    <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link() -%>

            <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
            Individual People

                Please type names of people to share this <%= @resource_type -%> with into the box below - suggestions will be displayed as you type.
                Select access rights from drop-down menu; these will be applied to all chosen people.
                Clicking "Add" will add selected people to the list.

                      ^_^<input type="text" id="ip_hidden_input" tabindex="-1" >

                        <input type="text" size="1" tabindex="" id="ip_autocomplete_input" />

Type the name of a friend, friend list, or email address

                    <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                      <option value="<%= Policy::NO_ACCESS -%>" >no access</option>
                      <option value="<%= Policy::VIEWING -%>" >viewing only</option>
                      <option value="<%= Policy::DOWNLOADING -%>" >viewing and downloading only</option>
                      <option value="<%= Policy::EDITING -%>" >viewing, downloading and editing</option>
                      <option value="<%= Policy::MANAGING -%>" >manage</option>
                    </select>

                    <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>

    <% if @resource.contributor -%>

Also include people in my..

          <input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_whitelist]" id="cb_use_whitelist" <%= "checked='checked'" if @use_whitelist -%> />
          - "white list", who always get full access

        <% white_lst = current_user.get_whitelist -%>
        <%= hidden_field_tag "#{FavouriteGroup::WHITELIST_NAME}_group_id", (white_lst ? white_lst.id : "none") -%>
          [
          <span id="<%= FavouriteGroup::WHITELIST_NAME -%>_edit_span" style="display: <%= white_lst ? "inline" : "none" -%>;">
            <%= link_to "edit", "/", :onclick => "editWhitelistBlacklist('#{FavouriteGroup::WHITELIST_NAME}'); return(false);" -%>

          <% unless white_lst -%>
            <span id="<%= FavouriteGroup::WHITELIST_NAME -%>_create_span">
              <%= link_to "create", "/", :onclick => "createWhitelistBlacklist('#{FavouriteGroup::WHITELIST_NAME}'); return(false);" -%>

          <% end -%>
          ]
        <%= image_tag icon_filename_for_key("spinner"), :id => "#{FavouriteGroup::WHITELIST_NAME}_creation_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle;" -%>

          <input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_blacklist]" id="cb_use_blacklist" <%= "checked='checked'" if @use_blacklist -%> />
          - "black list", who have no access at all

        <% black_lst = current_user.get_blacklist -%>
        <%= hidden_field_tag "#{FavouriteGroup::BLACKLIST_NAME}_group_id", (black_lst ? black_lst.id : "none") -%>
          [
          <span id="<%= FavouriteGroup::BLACKLIST_NAME -%>_edit_span" style="display: <%= black_lst ? "inline" : "none" -%>;">
            <%= link_to "edit", "/", :onclick => "editWhitelistBlacklist('#{FavouriteGroup::BLACKLIST_NAME}'); return(false);" -%>

          <% unless black_lst -%>
            <span id="<%= FavouriteGroup::BLACKLIST_NAME -%>_create_span">
              <%= link_to "create", "/", :onclick => "createWhitelistBlacklist('#{FavouriteGroup::BLACKLIST_NAME}'); return(false);" -%>

          <% end -%>
          ]
        <%= image_tag icon_filename_for_key("spinner"), :id => "#{FavouriteGroup::BLACKLIST_NAME}_creation_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle;" -%>

  <%# this DIV is to hold the 'redbox' links generated by a method in application_helper, -%>
  <%# these will be "clicked" by javascript, because hidden divs that are present in the -%>
  <%# generated code causes IE to break layout by inserting extra line break otherwise -%>
        <div id="<%= FavouriteGroup::WHITELIST_NAME -%>_redbox_link_div">
          <%= whitelist_blacklist_edit_popup_link(FavouriteGroup::WHITELIST_NAME) -%>

        <div id="<%= FavouriteGroup::BLACKLIST_NAME -%>_redbox_link_div">
          <%= whitelist_blacklist_edit_popup_link(FavouriteGroup::BLACKLIST_NAME) -%>

    <% end -%>

<%# initialization: required to keep javascript independent of the access type codes, to allow the use the constants instead -%>
<%= render :partial=>"assets/sharing_constants" %>

<%# this hidden input will submit all permission data with the form -%>
<%= hidden_field_tag "sharing[permissions][contributor_types]", "" -%>
<%= hidden_field_tag "sharing[permissions][values]", "" -%>

<%# @resource_type -%>
<%# @favourite_groups -%>
<%# @all_projects -%>

<%# @policy_type -%>
<%# @sharing_mode -%>
<%# @access_mode -%>
<%# @use_custom_sharing -%>
<%# @use_whitelist -%>
<%# @use_blacklist -%>

    <%= help_icon("Here you can specify who can view, download and edit this #{@resource_type}.") -%>
    Sharing

        Here you can specify who can view, download and edit this <%= @resource_type -%>.
        <%= link_to_function "Click here" + expand_image, visual_effect(:toggle_blind, "more_info", :duration => 0.3) -%> for more information.

          Here you may specify the People, Projects or Groups that may View and Edit the details about your <%= @resource_type -%>.

            You may:

Keep the <%= @resource_type -%> private, and only visible to yourself

Share with all Sysmo project members

Define more fine-grained sharing, by selecting Custom sharing permissions.
 By using custom sharing permissions you can share within your Project/Institution only,
 with specific individuals, or set up custom favourite groups for people you regularly need to share with.

<label for="sharing_scope_<%= Policy::PRIVATE -%>">
        <input type="hidden" name="sharing[access_type_<%= Policy::PRIVATE -%>]" value="<%= Policy::NO_ACCESS -%>">
        <input type="hidden" name="sharing[include_custom_sharing_<%= Policy::PRIVATE -%>]" value="0">

        <input <%= 'checked="checked"' if @sharing_mode == Policy::PRIVATE %> id="sharing_scope_<%= Policy::PRIVATE -%>" name="sharing[sharing_scope]"
                                                                     value="<%= Policy::PRIVATE -%>" type="radio" onclick="javascript:setSharingElementVisibility(<%= Policy::PRIVATE -%>);" />
        - Keep this <%= @resource_type -%> private.

Or share it with..

      <label for="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_REGISTERED_USERS -%> id="sharing_scope_<%= Policy::ALL_REGISTERED_USERS -%>" name="sharing[sharing_scope]"
              value="<%= Policy::ALL_REGISTERED_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_REGISTERED_USERS -%>);" />
        - All registered users for

      <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_REGISTERED_USERS,
        :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>

      <%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_REGISTERED_USERS,
        :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

      <label for="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::ALL_SYSMO_USERS -%> id="sharing_scope_<%= Policy::ALL_SYSMO_USERS -%>" name="sharing[sharing_scope]"
              value="<%= Policy::ALL_SYSMO_USERS -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::ALL_SYSMO_USERS -%>);" />
        - All users associated with any of the SysMO projects for

      <%= render :partial => "assets/sharing_form_access_type_dropdown", :locals => { :access_type_selector_for_scope => Policy::ALL_SYSMO_USERS,
        :sharing_scope => @sharing_mode, :access_type => @access_mode } -%>

      <%= render :partial => "assets/sharing_form_custom_permissions_checkbox", :locals => { :custom_sharing_cb_for_scope => Policy::ALL_SYSMO_USERS,
        :sharing_scope => @sharing_mode, :use_custom_sharing => @use_custom_sharing } -%>

      <label for="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>">
        <input type="radio" <%= 'checked="checked"' if @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY -%> id="sharing_scope_<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" name="sharing[sharing_scope]"
              value="<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>" onclick="javascript:setSharingElementVisibility(<%= Policy::CUSTOM_PERMISSIONS_ONLY -%>);" />
        - Use custom sharing permissions only

    <div id="specific_sharing" style="display: <%= (@use_custom_sharing || @sharing_mode == Policy::CUSTOM_PERMISSIONS_ONLY) ? "block" : "none" -%>; margin-top: 2em;">

        Custom sharing permissions

          So far you have selected to share this <%= @resource_type -%> with:

          Loading...

          Build up the list of people and groups to share with.
          Select from the options below and click "Add" to apply
          your choices and add collaborators to your current selection:

            <%= image_tag icon_filename_for_key("spinner"), :id => "f_group_deleting_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
            <%= help_icon("Here you can choose your favourite groups to share this #{@resource_type} with.") -%>
            Favourite Groups

              <% favourite_groups = FavouriteGroup.get_all_without_blacklists_and_whitelists(current_user.id) -%>
              <% f_group_select_options = (favourite_groups.blank? ? "<option value=\"\">You don't have any favourite groups</option>" : options_for_select(favourite_groups)) -%>

              <%= select_tag "favourite_group_select", f_group_select_options, :onchange => "javascript: replaceFavouriteGroupRedboxActionURL(); return(false);", :style => "width: 82%; vertical-align: middle; margin-right: 0.4em;", :disabled => (favourite_groups.blank?) -%>

              <%= link_to "Add", "", :id => "add_f_group_link", :style => "font-weight: bold; vertical-align: middle;", :disabled => (favourite_groups.blank?),
                :onclick => "javascript: if($('favourite_group_select').disabled) return(false); addContributor('FavouriteGroup', $('favourite_group_select').options[$('favourite_group_select').selectedIndex].text, parseInt($('favourite_group_select').options[$('favourite_group_select').selectedIndex].value), #{Policy::DETERMINED_BY_GROUP}); return(false);" -%>

              <li id="edit_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;"><%= favourite_group_popup_link_action_edit() -%>

              <li id="delete_f_group_li" style="display: <%= favourite_groups.blank? ? "none" : "block" -%>; list-style-type: disc; padding: 0;">
                <%= link_to "Delete selected favourite group", delete_favourite_group_path(0), :onclick => "deleteSelectedFavouriteGroup(); return(false);" -%>

<%= favourite_group_popup_link_action_new() -%>

            <%= help_icon("Here you can choose projects, institutions and workgroups to share this #{@resource_type} with.") -%>
            Projects and Institutions

              <% right_arrow_image = icon_filename_for_key("arrow_right") -%>

              Step 1
              <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

              Step 2
              <%= image_tag right_arrow_image, :style => "vertical-align: middle; padding: 0 0.8em;" -%>

              Step 3

                <input type="hidden" id="proj_select_step_index" value="1">

                  <%= image_tag icon_filename_for_key("spinner"), :id => "institutions_loading_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle; float: right;" -%>
                  Step 1: Select a project
                  <%= select("proj_project", "select",
                    Project.find(:all).collect {|p| [ p.name, p.id ] },
                    {:include_blank => 'All Projects @ Institution (from Step 2)'}, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                  Step 2: Select scope of the project
                  <%= select_tag("proj_institution_select", nil, {:style => "width: 100%; vertical-align: middle; margin: 0.3em 0;"}) -%>

                  Step 3: Choose access rights, review and submit

                  <select name="proj_access_type_select" id="proj_access_type_select" onchange="javascript: replaceReviewWorkGroupURL();" style="width: 100%; vertical-align: middle; margin: 0.3em 0;">
                    <option value="<%= Policy::VIEWING -%>" >Viewing only</option>
                    <option value="<%= Policy::DOWNLOADING -%>" >Viewing and downloading only</option>
                    <option value="<%= Policy::EDITING -%>" >Viewing, downloading and editing</option>
                  </select>

                    <%= link_to "< Previous step", "", :onclick => "javascript: projectInstitutionStepAction(-1); return(false);", :style => "font-weight: bold;" -%>

                    <%= link_to "Next step >", "", :onclick => "javascript: projectInstitutionStepAction(1); return(false);", :style => "font-weight: bold;" -%>

                        <%= link_to "Add immediately", "", :onclick => "javascript: addProjectInstitution(); return(false);", :style => "font-weight: bold; padding: 0;" -%>

<%= workgroup_member_review_popup_link() -%>

            <%= help_icon("Here you can specify individual people to share this #{@resource_type} with.") -%>
            Individual People

                Please type names of people to share this <%= @resource_type -%> with into the box below - suggestions will be displayed as you type.
                Select access rights from drop-down menu; these will be applied to all chosen people.
                Clicking "Add" will add selected people to the list.

                      ^_^<input type="text" id="ip_hidden_input" tabindex="-1" >

                        <input type="text" size="1" tabindex="" id="ip_autocomplete_input" />

Type the name of a friend, friend list, or email address

                    <select name="individual_people_access_type_select" id="individual_people_access_type_select" style="width: 344px; vertical-align: middle; margin-top: 0.3em;">
                      <option value="<%= Policy::NO_ACCESS -%>" >no access</option>
                      <option value="<%= Policy::VIEWING -%>" >viewing only</option>
                      <option value="<%= Policy::DOWNLOADING -%>" >viewing and downloading only</option>
                      <option value="<%= Policy::EDITING -%>" >viewing, downloading and editing</option>
                      <option value="<%= Policy::MANAGING -%>" >manage</option>
                    </select>

                    <%= link_to "Add", "", :onclick => "javascript: addIndividualPeople(); return(false);" -%>

Also include people in my..

        <input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_whitelist]" id="cb_use_whitelist" <%= "checked='checked'" if @use_whitelist -%> />
        - "white list", who always get full access

      <% white_lst = current_user.get_whitelist -%>
      <%= hidden_field_tag "#{FavouriteGroup::WHITELIST_NAME}_group_id", (white_lst ? white_lst.id : "none") -%>
        [
        <span id="<%= FavouriteGroup::WHITELIST_NAME -%>_edit_span" style="display: <%= white_lst ? "inline" : "none" -%>;">
          <%= link_to "edit", "/", :onclick => "editWhitelistBlacklist('#{FavouriteGroup::WHITELIST_NAME}'); return(false);" -%>

        <% unless white_lst -%>
          <span id="<%= FavouriteGroup::WHITELIST_NAME -%>_create_span">
            <%= link_to "create", "/", :onclick => "createWhitelistBlacklist('#{FavouriteGroup::WHITELIST_NAME}'); return(false);" -%>

        <% end -%>
      ]
      <%= image_tag icon_filename_for_key("spinner"), :id => "#{FavouriteGroup::WHITELIST_NAME}_creation_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle;" -%>

        <input <%= "disabled" if @sharing_mode == Policy::PRIVATE -%> style="margin-right: 0.3em;" value="1" type="checkbox" name="sharing[use_blacklist]" id="cb_use_blacklist" <%= "checked='checked'" if @use_blacklist -%> />
        - "black list", who have no access at all

      <% black_lst = current_user.get_blacklist -%>
      <%= hidden_field_tag "#{FavouriteGroup::BLACKLIST_NAME}_group_id", (black_lst ? black_lst.id : "none") -%>
        [
        <span id="<%= FavouriteGroup::BLACKLIST_NAME -%>_edit_span" style="display: <%= black_lst ? "inline" : "none" -%>;">
          <%= link_to "edit", "/", :onclick => "editWhitelistBlacklist('#{FavouriteGroup::BLACKLIST_NAME}'); return(false);" -%>

        <% unless black_lst -%>
          <span id="<%= FavouriteGroup::BLACKLIST_NAME -%>_create_span">
            <%= link_to "create", "/", :onclick => "createWhitelistBlacklist('#{FavouriteGroup::BLACKLIST_NAME}'); return(false);" -%>

        <% end -%>
      ]
      <%= image_tag icon_filename_for_key("spinner"), :id => "#{FavouriteGroup::BLACKLIST_NAME}_creation_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle;" -%>

      <%# this DIV is to hold the 'redbox' links generated by a method in application_helper, -%>
      <%# these will be "clicked" by javascript, because hidden divs that are present in the -%>
      <%# generated code causes IE to break layout by inserting extra line break otherwise -%>
      <div id="<%= FavouriteGroup::WHITELIST_NAME -%>_redbox_link_div">
        <%= whitelist_blacklist_edit_popup_link(FavouriteGroup::WHITELIST_NAME) -%>

      <div id="<%= FavouriteGroup::BLACKLIST_NAME -%>_redbox_link_div">
        <%= whitelist_blacklist_edit_popup_link(FavouriteGroup::BLACKLIST_NAME) -%>


fixes #7,#8

fixes #7,#8

git-svn-id: 268669d3058f191005ae665964cd19b71efa10c4@15680 3f47a204-8049-4147-aab0-d444c64e7564

<% if logged_in? %>

<%= link_to 'about GLOBAL', space_path(Space.find(1)),  :method=> 'get' , :class=>'main_title' %>

<%= link_to 'Project Partners', space_path(Space.find(1)),  :method=> 'get' , :class=>'main_title'%>

<%= link_to 'Logout', logout_path , :method=> 'get', :class=>'main_title'%>

<%= link_to  h(current_user.login), user_profile_path(current_user), :class=>'username' %>

	<% else%>

<%= link_to 'about GLOBAL', space_path(Space.find(1)),  :method=> 'get', :class=>'main_title' %>

<%= link_to 'Project Partners', space_path(Space.find(1)),  :method=> 'get', :class=>'main_title' %>

<%= link_to 'Login', login_path, :method=> 'get', :class=>'main_title' %>

<%= link_to 'Register', signup_path,  :method=> 'get', :class=>'main_title' %>

	<% end %>


fixed comment form for Rails 2.1

fixed comment form for Rails 2.1

Comments
<%= link_to(image_tag_with_tooltip('feed.png'), :controller => feed_controller,  :action => feed_action, :id => feed_id, :format => 'xml') rescue nil %>

<% if post %>

<% form_tag :controller => 'comments', :action => 'post' do %>
<%= hidden_field 'comment', 'commentable_id', :value => @profile ? @profile.id : @group.id %>
<%= hidden_field 'comment', 'commentable_type', :value => @profile ? "User" : "Group" %>
<%= text_area 'comment', 'text', :rows => 2, :style => "width: 99%" %>

<%= submit_tag 'Post Comment' %>
<% end %>

<% end %>
<% for comment in @comments %>
<a name="comment<%= comment.id %>">
<table class="comment" id="comment<%= comment.id %>">

<%= render :partial => "/shared/user_image_link", :locals => { :user => comment.user, :small => true } %>

at <%= comment.created_at.strftime("%H:%M on %d %b %y") %>, <%= render :partial => "/shared/user_link", :locals => { :user => comment.user } %> said:

<%=h comment.text %>

<% if (@current_user and (comment.user == @current_user or @profile == @current_user or (@group and @group.owner == @current_user))) %>
<%= link_to image_tag_with_tooltip('delete.png'), {:controller => 'comments', :action => 'delete', :id => comment}, :confirm => "Are you sure you want to delete this comment?", :method => :post %>
<% end %>

<% end %>

Comments
<%= link_to(image_tag_with_tooltip('feed.png'), :controller => feed_controller,  :action => feed_action, :id => feed_id, :format => 'xml') rescue nil %>

<% if post %>

<%= start_form_tag :controller => 'comments', :action => 'post' %>
<%= hidden_field 'comment', 'commentable_id', :value => @profile ? @profile.id : @group.id %>
<%= hidden_field 'comment', 'commentable_type', :value => @profile ? "User" : "Group" %>
<%= text_area 'comment', 'text', :rows => 2, :style => "width: 99%" %>

<%= submit_tag 'Post Comment' %>
<%= end_form_tag %>

<% end %>
<% for comment in @comments %>
<a name="comment<%= comment.id %>">
<table class="comment" id="comment<%= comment.id %>">

<%= render :partial => "/shared/user_image_link", :locals => { :user => comment.user, :small => true } %>

at <%= comment.created_at.strftime("%H:%M on %d %b %y") %>, <%= render :partial => "/shared/user_link", :locals => { :user => comment.user } %> said:

<%=h comment.text %>

<% if (@current_user and (comment.user == @current_user or @profile == @current_user or (@group and @group.owner == @current_user))) %>
<%= link_to image_tag_with_tooltip('delete.png'), {:controller => 'comments', :action => 'delete', :id => comment}, :confirm => "Are you sure you want to delete this comment?", :method => :post %>
<% end %>

<% end %>


Question mark

Question mark

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

        <%= javascript_include_tag :defaults %>

        <title>
        <% if @title %>
            <%=@title%> - WhatDoTheyKnow
        <% else %>
            WhatDoTheyKnow - file and explore Freedom of Information (FOI) requests
        <% end %>
        </title>
        <%= stylesheet_link_tag 'main' %>

            WhatDoTheyKnow?
            (<%= link_to "in development", about_url %>)

            Lift the lid on the UK public sector!

Make Request

<%= link_to "View Requests", request_list_url %>

<%= link_to "View Authorities", list_public_bodies_url(:tag => 'department') %>

        <% if @user %>

<%=link_to "My Requests", user_url(@user) %>

        <% end %>

<%= link_to "About", about_url %>

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

               <%= text_field_tag 'query', params[:query], { :size => 25, :id => "navigation_search_query" } %>
               <%= submit_tag "Search" %>

        <% end %>

    <% if MySociety::Config.getbool("STAGING_SITE", 1) %>

            This is a test version of the site. FOI requests will not be sent to real public bodies.

    <% end %>

    <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>

        <% if @user %>
            Hello, <%=h(@user.name)%>!
            (<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
        <% else %>
            Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
        <% end %>

    <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

            <% end %>
            <% if flash[:error] %>

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>">
            <%= yield :layout %>

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

        <%= javascript_include_tag :defaults %>

        <title>
        <% if @title %>
            <%=@title%> - WhatDoTheyKnow
        <% else %>
            WhatDoTheyKnow - file and explore Freedom of Information (FOI) requests
        <% end %>
        </title>
        <%= stylesheet_link_tag 'main' %>

            WhatDoTheyKnow
            (<%= link_to "in development", about_url %>)

            Lift the lid on the UK public sector!

Make Request

<%= link_to "View Requests", request_list_url %>

<%= link_to "View Authorities", list_public_bodies_url(:tag => 'department') %>

        <% if @user %>

<%=link_to "My Requests", user_url(@user) %>

        <% end %>

<%= link_to "About", about_url %>

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

               <%= text_field_tag 'query', params[:query], { :size => 25, :id => "navigation_search_query" } %>
               <%= submit_tag "Search" %>

        <% end %>

    <% if MySociety::Config.getbool("STAGING_SITE", 1) %>

            This is a test version of the site. FOI requests will not be sent to real public bodies.

    <% end %>

    <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>

        <% if @user %>
            Hello, <%=h(@user.name)%>!
            (<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
        <% else %>
            Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
        <% end %>

    <% end %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

            <% end %>
            <% if flash[:error] %>

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>">
            <%= yield :layout %>

        Built by mySociety ... and you.
        Get the source code (is on Rails).
        Dedicated to Chris Lightfoot.


hide user names if the current_user shouldn't see them

<% if @asset.image? -%>
  <%= link_to(image_tag(@asset.public_filename(:preview)), @asset.public_filename) %>
<% end -%>

<% if @group.publicly_visible_members or current_user.may? :edit, @page -%>

  <%= 'created by'.t %>:
  <%= h @page.created_by.both_names if @page.created_by %>

<% end -%>

  <%= 'created on'.t %>:
  <%= full_time(@page.created_at) %>

<% if @page.updated_at > @page.created_at -%>
<% if @group.publicly_visible_members or current_user.may? :edit, @page -%>

  <%= 'last updated by'.t %>:
  <%= h @page.updated_by.both_names %>

<% end -%>

  <%= 'last updated on'.t %>:
  <%= full_time(@page.updated_at) %>

<% end -%>

  <%= 'file type'.t %>:
  <%= @asset.content_type %>

  <%= 'size'.t %>:
  <%= friendly_size(@asset.size) %>

<% if @asset.image? -%>

  <%= 'dimensions'.t %>:
  <%= "#{@asset.width}x#{@asset.height}" %>

<% end -%>

<%=
  links = [
    link_to("download %s" % @asset.filename, @asset.public_filename),
    link_to_function("view versions", "$('versions').toggle()")
  ]
  links.push link_to_function("upload a new version", "$('upload-new').toggle()") if current_user.may? :edit, @page

  link_line links
%>

  <% @asset.versions.reverse.each do |version| -%>
  <tr id="asset_<%= @asset.id %>_version_<%= version.version %>">

      <% if @current_user.may? :edit, @page and version.version < @asset.version %>
      <%= link_to_remote(image_tag('actions/trash.png'), {:url => direct_url(:page_id => @page.id, :action => :destroy_version, :id => version.version, :controller => 'tool/asset'), :confirm => 'are you sure you want to delete this version?', :before => "$($(this).up('td')).addClassName('busy')", :failure => "$($(this).up('td')).removeClassName('busy')"}, {:href => url_for(:controller => 'asset', :action => 'destroy', :id => @asset.id)}) %>
      <% end %>

    <%= version.image? ? image_tag(version.public_filename(:thumb)) : image_tag(version.small_icon) %>
    <%= link_to "#{version.version}: #{version.filename}", version.public_filename %>

  <% end -%>

  <% form_tag page_url(@page, :action => 'update'), :multipart => true do -%>
    <%= file_field_tag 'asset' %>
    <%= submit_tag 'upload' %>
  <% end %>

<% if @asset.image? -%>
  <%= link_to(image_tag(@asset.public_filename(:preview)), @asset.public_filename) %>
<% end -%>

  <%= 'created by'.t %>:
  <%= h @page.created_by.both_names if @page.created_by %>

  <%= 'created on'.t %>:
  <%= full_time(@page.created_at) %>

<% if @page.updated_at > @page.created_at -%>

  <%= 'last updated by'.t %>:
  <%= h @page.updated_by.both_names %>

  <%= 'last updated on'.t %>:
  <%= full_time(@page.updated_at) %>

<% end -%>

  <%= 'file type'.t %>:
  <%= @asset.content_type %>

  <%= 'size'.t %>:
  <%= friendly_size(@asset.size) %>

<% if @asset.image? -%>

  <%= 'dimensions'.t %>:
  <%= "#{@asset.width}x#{@asset.height}" %>

<% end -%>

<%=
  links = [
    link_to("download %s" % @asset.filename, @asset.public_filename),
    link_to_function("view versions", "$('versions').toggle()")
  ]
  links.push link_to_function("upload a new version", "$('upload-new').toggle()") if current_user.may? :edit, @page

  link_line links
%>

  <% @asset.versions.reverse.each do |version| -%>
  <tr id="asset_<%= @asset.id %>_version_<%= version.version %>">

      <% if @current_user.may? :edit, @page and version.version < @asset.version %>
      <%= link_to_remote(image_tag('actions/trash.png'), {:url => direct_url(:page_id => @page.id, :action => :destroy_version, :id => version.version, :controller => 'tool/asset'), :confirm => 'are you sure you want to delete this version?', :before => "$($(this).up('td')).addClassName('busy')", :failure => "$($(this).up('td')).removeClassName('busy')"}, {:href => url_for(:controller => 'asset', :action => 'destroy', :id => @asset.id)}) %>
      <% end %>

    <%= version.image? ? image_tag(version.public_filename(:thumb)) : image_tag(version.small_icon) %>
    <%= link_to "#{version.version}: #{version.filename}", version.public_filename %>

  <% end -%>

  <% form_tag page_url(@page, :action => 'update'), :multipart => true do -%>
    <%= file_field_tag 'asset' %>
    <%= submit_tag 'upload' %>
  <% end %>


Fix minor typo on pages admin page

Fix minor typo on pages admin page

git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@516 820eb932-12ee-0310-9ca8-eeb645f39767

<%= 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 %>

<%= 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 %>


readded missing variable

readded missing variable

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

		<title><%= @page_title || @item.title %></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-au" />
    <%= javascript_include_tag 'jquery-1.3.2.min.js' %>

    <%= javascript_include_tag 'jquery.flot.js' %>

Requirements Burndown

Graph - effort outstanding (select range to zoom)

    <%
      statuses = Status.find_all_by_type_name('Requirement', :conditions => ["generic_stage in (?) and enabled = 't'", Status.in_progress], :order => 'sequence')
      series = statuses.collect do |s|
        dates = @burndown[s.id].keys.sort
        utc_offset = Time.now.utc_offset
        points = dates.collect do |date|
          "[ #{(date.to_f + utc_offset)*1000}, #{@burndown[s.id][date]} ]"
        end
        " { label: \"#{s.value}\", data: [ #{points.join(',')} ] } "
      end
      flot_data = series.join(',')
    %>

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

		<title><%= @page_title || @item.title %></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-au" />
    <%= javascript_include_tag 'jquery-1.3.2.min.js' %>

    <%= javascript_include_tag 'jquery.flot.js' %>

Requirements Burndown

Graph - effort outstanding (select range to zoom)

    <%
      series = statuses.collect do |s|
        dates = @burndown[s.id].keys.sort
        utc_offset = Time.now.utc_offset
        points = dates.collect do |date|
          "[ #{(date.to_f + utc_offset)*1000}, #{@burndown[s.id][date]} ]"
        end
        " { label: \"#{s.value}\", data: [ #{points.join(',')} ] } "
      end
      flot_data = series.join(',')
    %>


minor changes.

minor changes.

<%= link_to "home", :controller => "articles", :action => "home"-%>
<%for page in @pages -%>
   | <%= (not page.target_url or page.target_url == "") ? link_to( page.title.downcase, :controller => "pages", :action => "show", :id => page.id) : link_to(page.title.downcase, page.target_url)-%>
<%end-%> | <%if @current_user-%><%=link_to("Logout "+@current_user[:username], {:controller => 'people', :action => 'logout'})-%><%else-%><%=link_to("Login", {:controller => 'people', :action => 'login'})-%><%end-%>

<%= link_to "home", :controller => "articles", :action => "home"-%>
<%for page in @pages -%>
   | <%= (not page.target_url or page.target_url == "") ? link_to( page.title.downcase, :controller => "pages", :action => "show", :id => page.id) : link_to(page.title.downcase, page.target_url)-%>
<%end-%> | Logout


switch LIG contact to Judy

switch LIG contact to Judy

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<% if RAILS_ENV == "development" %>
  <% flash[:error] ||= "You are on our development site -- you should NOT be filling in your app or reference here.  Remove the 'dev.' from your url, and email #{$tech_email_only} with how you got here"
  %>

<% end %>

  <%
=begin
  flash[:error] = %|
  There will be a short, approximately 10-20 minutes, scheduled outage between 12pm-2pm PST

  -CIM team, Wed May 7
  |
=end
  %>

    <title>Project Application Tool</title>
    <%= stylesheet_link_tag 'main2', 'connexion_default' %>
    <%= render :partial => "externs/sortable_tables" %>
    <%= javascript_include_tag "prototype", "effects" %>
    <%= render :partial => "externs/load_extern" %>

    <%= connexion_bar if @viewer && session[:login_source] == 'gcx' %>

    <% if RAILS_ENV == 'development' && @debug -%>

debug: <%= @debug -%>

    <% end -%>

      Loading <%=image_tag('spinner.gif')%>

      Saving <%=image_tag('spinner.gif')%>

        <% if @viewer %>

user:
            <%= @viewer.name %>
            <% unless session[:login_source] == 'gcx' -%>
               - <%= link_to "logout", :action => :logout, :controller => :security %>
            <% end %>

        <% end %>

        <% if @eg %>

group:
            <%= @eg.to_s_with_eg_path %>
            <%= link_to 'change', scope_event_groups_url %>

        <% end %>

      <% if session[:logo_url] -%>
          <%= image_tag session[:logo_url], :class => 'branding_logo' %>
          Project Application Tool
      <% else %>

Project Application Tool

      <% end -%>

    <% if @viewer %>

          <%= new_item "Your Apps", "your_apps", :list %>
          <% if @show_your_project %>
            <%= new_item "Your Projects", "main", :your_projects %>
          <% end %>
          <% unless @viewer.is_student?(@eg) %>
            <%= new_item "App Processing", "main", :your_applications %>
            <% if @eg && @eg.has_your_campuses %>
              <%= new_item "Your Campuses", "main", :your_campuses %>
	          <% end %>
            <% if @viewer.is_eventgroup_coordinator?(@eg) %>
              <%= new_item "Tools", "tools", :index %>
              <%= new_item "Manage Forms", "forms" %>
              <%= new_item "Manage Groups", "event_groups" %>
            <% end %>
            <%= new_item "Manage Projects", "manage_projects", :list %>
            <%= new_item "Reports", "reports", :index %>
          <% end %>
          <%= new_item "Profiles", "profiles", :index%>

    <% end %>

    <% flash.each do |key, msg| -%>
      <% full_msg = msg %>
      <%= content_tag :div, full_msg, :id => "flash_#{key}", :class => 'error flash' %>
    <% end -%>

    <% @notifications.each do |n| -%>
      <% full_msg = n.message
         full_msg = h(full_msg) unless n.allow_html
         full_msg += "
"

         unless n.no_hide_button || @viewer.nil?
           full_msg += link_to_remote('Hide',
            :url => { :controller => 'notification_acknowledgments',
                      :action => 'create', :notification_id => n.id },
            :success => "$(\"notification_#{n.id}\").fade()"
           )
         end
        %>
      <%= content_tag :div, full_msg, :id => "notification_#{n.id}", :class => 'error flash' %>
    <% end -%>

     <% if @viewer && !@eg.nil? && !@viewer.is_student?(@eg) %>

        <%= form_remote_tag :url => { :controller => 'main', :action => :find_people },	:before => "Element.show('loading');", :complete  => "Element.hide('loading');" %>
          Search People:
          <%= text_field 'viewer', 'name', :size => 20, :value => '' %>
          <%= submit_tag "Search" %>
        </form>

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

    <%= render_if_possible(controller.controller_name + "/menu") ||
           (@submenu && render_if_possible(@submenu + "/menu"))
    %>

    <% submenu_items_html = yield :submenu %>
    <% if submenu_items_html && !@eg.nil? %>

          <%= submenu_items_html %>

    <% end %>

        <% if @form && params[:controller] != 'forms' %>
          <%= render_if_possible("qe_forms/form_#{@form}") || render_if_possible(:file => "layouts/form_#{@form}")%>
        <% else %>
          <%= yield %>
        <% end %>

    <% if @eg || @show_contact_emails_override %>

        Questions?

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - judyh@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

			General Inquiries:pat.help@powertochange.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<% if RAILS_ENV == "development" %>
  <% flash[:error] ||= "You are on our development site -- you should NOT be filling in your app or reference here.  Remove the 'dev.' from your url, and email #{$tech_email_only} with how you got here"
  %>

<% end %>

  <%
=begin
  flash[:error] = %|
  There will be a short, approximately 10-20 minutes, scheduled outage between 12pm-2pm PST

  -CIM team, Wed May 7
  |
=end
  %>

    <title>Project Application Tool</title>
    <%= stylesheet_link_tag 'main2', 'connexion_default' %>
    <%= render :partial => "externs/sortable_tables" %>
    <%= javascript_include_tag "prototype", "effects" %>
    <%= render :partial => "externs/load_extern" %>

    <%= connexion_bar if @viewer && session[:login_source] == 'gcx' %>

    <% if RAILS_ENV == 'development' && @debug -%>

debug: <%= @debug -%>

    <% end -%>

      Loading <%=image_tag('spinner.gif')%>

      Saving <%=image_tag('spinner.gif')%>

        <% if @viewer %>

user:
            <%= @viewer.name %>
            <% unless session[:login_source] == 'gcx' -%>
               - <%= link_to "logout", :action => :logout, :controller => :security %>
            <% end %>

        <% end %>

        <% if @eg %>

group:
            <%= @eg.to_s_with_eg_path %>
            <%= link_to 'change', scope_event_groups_url %>

        <% end %>

      <% if session[:logo_url] -%>
          <%= image_tag session[:logo_url], :class => 'branding_logo' %>
          Project Application Tool
      <% else %>

Project Application Tool

      <% end -%>

    <% if @viewer %>

          <%= new_item "Your Apps", "your_apps", :list %>
          <% if @show_your_project %>
            <%= new_item "Your Projects", "main", :your_projects %>
          <% end %>
          <% unless @viewer.is_student?(@eg) %>
            <%= new_item "App Processing", "main", :your_applications %>
            <% if @eg && @eg.has_your_campuses %>
              <%= new_item "Your Campuses", "main", :your_campuses %>
	          <% end %>
            <% if @viewer.is_eventgroup_coordinator?(@eg) %>
              <%= new_item "Tools", "tools", :index %>
              <%= new_item "Manage Forms", "forms" %>
              <%= new_item "Manage Groups", "event_groups" %>
            <% end %>
            <%= new_item "Manage Projects", "manage_projects", :list %>
            <%= new_item "Reports", "reports", :index %>
          <% end %>
          <%= new_item "Profiles", "profiles", :index%>

    <% end %>

    <% flash.each do |key, msg| -%>
      <% full_msg = msg %>
      <%= content_tag :div, full_msg, :id => "flash_#{key}", :class => 'error flash' %>
    <% end -%>

    <% @notifications.each do |n| -%>
      <% full_msg = n.message
         full_msg = h(full_msg) unless n.allow_html
         full_msg += "
"

         unless n.no_hide_button || @viewer.nil?
           full_msg += link_to_remote('Hide',
            :url => { :controller => 'notification_acknowledgments',
                      :action => 'create', :notification_id => n.id },
            :success => "$(\"notification_#{n.id}\").fade()"
           )
         end
        %>
      <%= content_tag :div, full_msg, :id => "notification_#{n.id}", :class => 'error flash' %>
    <% end -%>

     <% if @viewer && !@eg.nil? && !@viewer.is_student?(@eg) %>

        <%= form_remote_tag :url => { :controller => 'main', :action => :find_people },	:before => "Element.show('loading');", :complete  => "Element.hide('loading');" %>
          Search People:
          <%= text_field 'viewer', 'name', :size => 20, :value => '' %>
          <%= submit_tag "Search" %>
        </form>

    <% end %>

    <% if @title %>

<%=@title%>

    <% end %>

    <%= render_if_possible(controller.controller_name + "/menu") ||
           (@submenu && render_if_possible(@submenu + "/menu"))
    %>

    <% submenu_items_html = yield :submenu %>
    <% if submenu_items_html && !@eg.nil? %>

          <%= submenu_items_html %>

    <% end %>

        <% if @form && params[:controller] != 'forms' %>
          <%= render_if_possible("qe_forms/form_#{@form}") || render_if_possible(:file => "layouts/form_#{@form}")%>
        <% else %>
          <%= yield %>
        <% end %>

    <% if @eg || @show_contact_emails_override %>

        Questions?

				Campus for Christ - projects@campusforchrist.org

				LeaderImpact Group - vip@leaderimpactgroup.com

				Athletes in Action - morgank@athletesinaction.com

			General Inquiries:pat.help@powertochange.org

			Online help can be found here.

    <% end %>

    <%= initialize_sortable_tables %>


 r272@sede:  terceiro | 2007-07-29 23:54:07 -0300
 ActionItem0: closing <a>

git-svn-id: 43659daf80e124e0b603d67096418e58e4f21099@276 3f533792-8f58-4932-b0fe-aaf55b0a4547

    <%= javascript_include_tag :defaults %>
    <%= design_all_header_tags %>

    <%= image_tag 'loading.gif', :id => 'spinner', :style => "display:none; float:right;" %>

          <%= _('Skip to:') %>
          <%= _('Content') %> |
          <%= _('Navigation') %> |
          <%= _('Footer') %>

          <%= header %>

          <%= flash[:notice] %>

        <%= design_display(yield) %>

          <%= footer %>
          <%= design_display_icon('back')%>


ActionItem514: added asset params to cache of menu

git-svn-id: 43659daf80e124e0b603d67096418e58e4f21099@2234 3f533792-8f58-4932-b0fe-aaf55b0a4547

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title>
      <%= @environment.name() %>
      <%- if @category -%>
        → <%= @category.full_name -%>
      <%- end -%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="FIXME: Descriptions of Noosfero" />
    <meta name="keywords" content="Noosfero, Community, Open Source" />
    <link rel="shortcut icon" href="<%= '/designs/themes/' + current_theme + '/images/favicon.ico' %>" type="image/x-icon" />

    <%= javascript_include_tag 'default-config' %>
    <%= javascript_include_tag :defaults %>
    <%# javascript_include_tag 'animator' %>
    <%= javascript_include_tag 'menu' %>
    <%= javascript_include_tag 'auto-open-menu' %>
    <%= include_lightbox_header %>
    <%= javascript_include_tag 'cms' if @controller.controller_name == 'cms' %>
    <%= theme_javascript %>

    <%#
     stylesheet_import is better then stylesheet_link_tag because the stylesheet
     must be loaded before the page show.
    %>
    <%=
      # Load the principal css files:
      stylesheet_import( %w( common help menu article button search blocks forms login-box )
                         ) + "\n" +
      stylesheet_import( %w( common help menu article button search blocks forms login-box ),
                         :themed_source => true ) + "\n" +
      # Load the boxes's css file if each exists:
      import_blocks_stylesheets +
      # Load the controller's css file if it exists:
      stylesheet_import( "controller_"+ @controller.controller_name() ) + "\n" +
      stylesheet_import( "controller_"+ @controller.controller_name(), :themed_source => true )
    %>

    <%# FIXME %>
    <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %>
    <%= stylesheet_link_tag '/designs/icons/default/style.css' %>

  <body class='noosfero category<%= category_color %><%=
    # Identify the current controller and action for the CSS:
    " controller_"+ @controller.controller_name() +
    " action_"+ @controller.controller_name() +"_"+ @controller.action_name()
    %>' onload='noosfero_init();'
    help=<%= _('Pass the mouse over page elements to get help on them. Click the question mark icon on the top-right corner to deactivate this help window.').inspect %> >

    <% unless flash[:notice].nil? %>

        <%= flash[:notice] %>
        <%= javascript_tag(
          visual_effect( :appear,    'notice', :duration => 2, :queue => :end ) +
          visual_effect( :highlight, 'notice', :duration => 3, :queue => :end ) +
          visual_effect( :fade,      'notice', :duration => 2, :queue => :end )
        ) %>

    <% end %>

      <%= _('Go to content') %>

BETA

        <%= _("This is %s's shortcuts bar. Using it you have access to the main features of the environment and you find the information of your interest more quickly.") % @environment.name %>

        <%= _("This bar helps you find information following two paths or dimensions. First dimension is composed of categories, which you'll find in the colored tabs in the top. Second dimension has content types, and you'll find them in the animated bar on your right.") % @environment.name %>

          <%= link_to ""+ @environment.name() +"",
                      { :controller=>"home" },
                        :id=>"menu_link_to_envhome",
                        :title=>@environment.name  %>
         <% cache(:controller => 'public', :action => 'categories_menu', :asset => params[:asset]) do %>
            <%= render :file => 'shared/categories_menu' %>
          <% end %>

           <%= language_chooser(:element => 'dropdown') %>

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

        <a href="#" id="btShowHelp" class="icon-help32on help-on"
           title="<%= _('Turn help on/off') %>"
           onclick="mouseHelpOnOff(); return false"><%= _('Help') %>

          <% if @controller.send(:boxes_editor?) %>
            <%= yield %>
            <%= display_boxes_editor(@controller.boxes_holder) %>
          <% else %>
            <% if uses_design_blocks?  %>
              <%= display_boxes(@controller.boxes_holder, yield) %>
            <% else %>
              <%= yield %>
            <% end %>
          <% end %>

      <%= render :file => ('../../public/designs/themes/' + current_theme + '/footer.rhtml' ) %>

    <%= javascript_include_tag 'show-mouse-help' %>
    <%= javascript_include_tag 'noosfero-show-help' %>

<%=
      _('Your web browser is obsolete!') +'

'+
      _('This website will not look as good as it could.
         Don\'t you want to use Firefox? That is a great web browser, free,
         and made by people of all the world parts.')
      %>

      <%= _('Get Firefox Now!') %>

    <%= javascript_include_tag 'better-browser-promotion' %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title>
      <%= @environment.name() %>
      <%- if @category -%>
        → <%= @category.full_name -%>
      <%- end -%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="FIXME: Descriptions of Noosfero" />
    <meta name="keywords" content="Noosfero, Community, Open Source" />
    <link rel="shortcut icon" href="<%= '/designs/themes/' + current_theme + '/images/favicon.ico' %>" type="image/x-icon" />

    <%= javascript_include_tag 'default-config' %>
    <%= javascript_include_tag :defaults %>
    <%# javascript_include_tag 'animator' %>
    <%= javascript_include_tag 'menu' %>
    <%= javascript_include_tag 'auto-open-menu' %>
    <%= include_lightbox_header %>
    <%= javascript_include_tag 'cms' if @controller.controller_name == 'cms' %>
    <%= theme_javascript %>

    <%#
     stylesheet_import is better then stylesheet_link_tag because the stylesheet
     must be loaded before the page show.
    %>
    <%=
      # Load the principal css files:
      stylesheet_import( %w( common help menu article button search blocks forms login-box )
                         ) + "\n" +
      stylesheet_import( %w( common help menu article button search blocks forms login-box ),
                         :themed_source => true ) + "\n" +
      # Load the boxes's css file if each exists:
      import_blocks_stylesheets +
      # Load the controller's css file if it exists:
      stylesheet_import( "controller_"+ @controller.controller_name() ) + "\n" +
      stylesheet_import( "controller_"+ @controller.controller_name(), :themed_source => true )
    %>

    <%# FIXME %>
    <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %>
    <%= stylesheet_link_tag '/designs/icons/default/style.css' %>

  <body class='noosfero category<%= category_color %><%=
    # Identify the current controller and action for the CSS:
    " controller_"+ @controller.controller_name() +
    " action_"+ @controller.controller_name() +"_"+ @controller.action_name()
    %>' onload='noosfero_init();'
    help=<%= _('Pass the mouse over page elements to get help on them. Click the question mark icon on the top-right corner to deactivate this help window.').inspect %> >

    <% unless flash[:notice].nil? %>

        <%= flash[:notice] %>
        <%= javascript_tag(
          visual_effect( :appear,    'notice', :duration => 2, :queue => :end ) +
          visual_effect( :highlight, 'notice', :duration => 3, :queue => :end ) +
          visual_effect( :fade,      'notice', :duration => 2, :queue => :end )
        ) %>

    <% end %>

      <%= _('Go to content') %>

BETA

        <%= _("This is %s's shortcuts bar. Using it you have access to the main features of the environment and you find the information of your interest more quickly.") % @environment.name %>

        <%= _("This bar helps you find information following two paths or dimensions. First dimension is composed of categories, which you'll find in the colored tabs in the top. Second dimension has content types, and you'll find them in the animated bar on your right.") % @environment.name %>

          <%= link_to ""+ @environment.name() +"",
                      { :controller=>"home" },
                        :id=>"menu_link_to_envhome",
                        :title=>@environment.name  %>
          <% cache(:controller => 'public', :action => 'categories_menu') do %>
            <%= render :file => 'shared/categories_menu' %>
          <% end %>

           <%= language_chooser(:element => 'dropdown') %>

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

        <a href="#" id="btShowHelp" class="icon-help32on help-on"
           title="<%= _('Turn help on/off') %>"
           onclick="mouseHelpOnOff(); return false"><%= _('Help') %>

          <% if @controller.send(:boxes_editor?) %>
            <%= yield %>
            <%= display_boxes_editor(@controller.boxes_holder) %>
          <% else %>
            <% if uses_design_blocks?  %>
              <%= display_boxes(@controller.boxes_holder, yield) %>
            <% else %>
              <%= yield %>
            <% end %>
          <% end %>

      <%= render :file => ('../../public/designs/themes/' + current_theme + '/footer.rhtml' ) %>

    <%= javascript_include_tag 'show-mouse-help' %>
    <%= javascript_include_tag 'noosfero-show-help' %>

<%=
      _('Your web browser is obsolete!') +'

'+
      _('This website will not look as good as it could.
         Don\'t you want to use Firefox? That is a great web browser, free,
         and made by people of all the world parts.')
      %>

      <%= _('Get Firefox Now!') %>

    <%= javascript_include_tag 'better-browser-promotion' %>


AP page moderation 'Public' => 'Make Public'

    Title
    Type
    Created At
    Created By

<%= will_paginate @pages %>

  <% @pages.each do |page| %>
    <tr class="<%=cycle('row_0', 'row_1')%>">
      <%= link_to page.title, page_url(page) %>
      <%=h page.type %>
      <%=h page.created_at.strftime("%d %b, %Y ") %>
      <%=h page.created_by_login %>
      <% if @current_view == 'pending' %>

	  <%= button_to "Approve", :action => "approve", :params => {:id => page.id, :view => @current_view} %>
        <%= button_to "Trash", :action => "trash", :params => {:id => page.id, :view => @current_view} %>
      <% elsif @current_view == 'vetted' %>

	  <%= button_to "Trash", :action => "trash", :params => {:id => page.id, :view => @current_view} %>
      <% elsif @current_view == 'deleted' %>

	  <%= button_to "Undelete", :action => "undelete", :params => {:id => page.id, :view => @current_view} %>
      <% elsif @current_view == 'public requested' %>

            <%= link_to "Make Public", { :action => 'update_public', :id => page.id, :view => @current_view, :public => true }, :method => :post %> <%= link_to "Deny", { :action => 'update_public', :id => page.id, :view => @current_view, :public => false }, :method => :post  %>

	  <%#= button_to "Public", :action => "update_public", :params => {:id => page.id, :view => @current_view, :public => true } %>
	  <%#= button_to "Deny", :action => "update_public", :params => {:id => page.id, :view => @current_view, :public => false} %>

      <% elsif @current_view == 'public' %>

            <%= link_to "Remove Public", { :action => 'remove_public', :id => page.id, :view => @current_view }, :method => :post %>

	  <%#= button_to "Remove Public", :action => "remove_public", :params => {:id => page.id, :view => @current_view} %>
      <%end%>

  <% end %>

<%= will_paginate @pages %>

    Title
    Type
    Created At
    Created By

<%= will_paginate @pages %>

  <% @pages.each do |page| %>
    <tr class="<%=cycle('row_0', 'row_1')%>">
      <%= link_to page.title, page_url(page) %>
      <%=h page.type %>
      <%=h page.created_at.strftime("%d %b, %Y ") %>
      <%=h page.created_by_login %>
      <% if @current_view == 'pending' %>

	  <%= button_to "Approve", :action => "approve", :params => {:id => page.id, :view => @current_view} %>
        <%= button_to "Trash", :action => "trash", :params => {:id => page.id, :view => @current_view} %>
      <% elsif @current_view == 'vetted' %>

	  <%= button_to "Trash", :action => "trash", :params => {:id => page.id, :view => @current_view} %>
      <% elsif @current_view == 'deleted' %>

	  <%= button_to "Undelete", :action => "undelete", :params => {:id => page.id, :view => @current_view} %>
      <% elsif @current_view == 'public requested' %>

            <%= link_to "Public", { :action => 'update_public', :id => page.id, :view => @current_view, :public => true }, :method => :post %>
            <%= link_to "Deny", { :action => 'update_public', :id => page.id, :view => @current_view, :public => false }, :method => :post  %>

	  <%#= button_to "Public", :action => "update_public", :params => {:id => page.id, :view => @current_view, :public => true } %>
	  <%#= button_to "Deny", :action => "update_public", :params => {:id => page.id, :view => @current_view, :public => false} %>

      <% elsif @current_view == 'public' %>

            <%= link_to "Remove Public", { :action => 'remove_public', :id => page.id, :view => @current_view }, :method => :post %>

	  <%#= button_to "Remove Public", :action => "remove_public", :params => {:id => page.id, :view => @current_view} %>
      <%end%>

  <% end %>

<%= will_paginate @pages %>


some code for file columns leaked in. taking it back out. file column support still exists only on my hard drive.

<% # should we pass in :name on our own? %>
<% scope ||= nil %>
<% record ||= nil %>
<% object = record.nil? ? :record : record %>
<% name = scope.nil? ? "record[#{column.name}]" : "#{scope}[#{column.name}]" %>

<label for="<%= "record_#{column.name}" %>"><%= column.label %>
<%= if override_form_field?(column)
  send(override_form_field(column), object)
elsif !column.association.nil? and column.ui_type == :select
  select(object, column.name, column.association.klass.find(:all).collect {|r| [r.to_label, r.id]}, {}, { :name => name })
else
  options = { :name => name }
  text_options = options.merge( :autocomplete => "off", :size => 20, :class => 'text-input' )
  if column.virtual?
    text_field(object, column.name, text_options)
  elsif [:text, :string, :integer, :float, :decimal].include?(column.column.type)
    input(object, column.name, text_options)
  else
    input(object, column.name, options)
  end
end
-%>

<% if column.description -%>

<%= column.description %>

<% end -%>

<% # should we pass in :name on our own? %>
<% scope ||= nil %>
<% record ||= nil %>
<% object = record.nil? ? :record : record %>
<% name = scope.nil? ? "record[#{column.name}]" : "#{scope}[#{column.name}]" %>

<label for="<%= "record_#{column.name}" %>"><%= column.label %>
<%= if override_form_field?(column)
  send(override_form_field(column), object)
elsif is_file_column?(column, record)
  file_column_field('record', column.name)
elsif !column.association.nil? and column.ui_type == :select
  select(object, column.name, column.association.klass.find(:all).collect {|r| [r.to_label, r.id]}, {}, { :name => name })
else
  options = { :name => name }
  text_options = options.merge( :autocomplete => "off", :size => 20, :class => 'text-input' )
  if column.virtual?
    text_field(object, column.name, text_options)
  elsif [:text, :string, :integer, :float, :decimal].include?(column.column.type)
    input(object, column.name, text_options)
  else
    input(object, column.name, options)
  end
end
-%>

<% if column.description -%>

<%= column.description %>

<% end -%>


Don't show staff or PIFs on proposal form


fixed foo

fixed foo

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => @event.class.to_s.pluralize, :property => @event.title} -%>

<%= link_to @event.title-%>

  <%if @event.agenda != ""-%>
Agenda
<%end-%>
  <%= @event.agenda -%>
  <%if @event.description != ""-%>
Description
<%end-%>
  <%= @event.description -%>
  <%if @event.minutes and @event.minutes.length > 0-%>

Minutes

    <%for m in @event.minutes-%>

<%= link_to "Minutes for #{@event.title}", :controller => 'minutes', :action => 'show', :id => m-%>

    <%end-%>

  <%end-%>

<%if @current_user-%><%= link_to 'Edit', :action => 'edit', :id => @event %> | <%end-%>
<%= link_to 'Events list', :action => 'list' %>
<%end-%>

<%content_for("right") do-%>
<%if @recent_events-%>

Recent events

  <%for event in @recent_events -%>

<%= link_to truncate(event.title,30), :id => event-%>

  <%end-%>

<%= link_to "Show all", :action => 'list'-%>
<%end-%>

Properties

Title: <%= @event.title-%>

  <%if @event.venue-%>
Venue: <%= link_to @event.venue.short_name, :controller => 'venues', :action => 'show', :id => @event.venue-%>
<%end-%>
  <%if @event.date and @event.date != ""%>
Event date: <%= @event.date.strftime("%d %b, %Y")-%>
<%end-%>
  <%if @event.event_url and @event.event_url != ""%>
<a href="<%=@event.event_url-%>">Event website
<%end-%>
  <%if @event.upcoming_url and @event.upcoming_url != ""%>
<a href="<%= @event.upcoming_url-%>">Y! Upcoming url
<%end-%>
  <%if @event.flickr_url and @event.flickr_url != ""%>
<a href="<%= @event.flickr_url-%>">Flickr page
<%end-%>

Created on: <%= @event.created_at.strftime("%d %b, %Y")-%>

<%end-%>

<%content_for("left") do-%>
<%= render :partial => "layouts/nav_bar", :locals => {:category => @event.class.to_s.pluralize, :property => @event.title} -%>

<%= link_to @event.title-%>

Agenda

  <%= @event.agenda -%>

Description

  <%= @event.description -%>
  <%if @event.minutes and @event.minutes.length > 0-%>

Minutes

    <%for m in @event.minutes-%>

<%= link_to "Minutes for #{@event.title}", :controller => 'minutes', :action => 'show', :id => m-%>

    <%end-%>

  <%end-%>

<%if @current_user-%><%= link_to 'Edit', :action => 'edit', :id => @event %> | <%end-%>
<%= link_to 'Events list', :action => 'list' %>
<%end-%>

<%content_for("right") do-%>
<%if @recent_events-%>

Recent events

  <%for event in @recent_events -%>

<%= link_to truncate(event.title,30), :id => event-%>

  <%end-%>

<%= link_to "Show all", :action => 'list'-%>
<%end-%>

Properties

Title: <%= @event.title-%>

  <%if @event.date and @event.date != ""%>
Event date: <%= @event.date.strftime("%d %b, %Y")-%>
<%end-%>
  <%if @event.event_url and @event.event_url != ""%>
<a href="<%=@event.event_url-%>">Event website
<%end-%>
  <%if @event.upcoming_url and @event.upcoming_url != ""%>
<a href="<%= @event.upcoming_url-%>">Y! Upcoming url
<%end-%>
  <%if @event.flickr_url and @event.flickr_url != ""%>
<a href="<%= @event.flickr_url-%>">Flickr page
<%end-%>

Created on: <%= @event.created_at.strftime("%d %b, %Y")-%>

<%end-%>


git-svn-id: https://svn.csc.ncsu.edu:8443/svn/research-expertiza/trunk@223 392d7b7b-3f31-0410-9dc3-c95a9635ea79

<%= error_messages_for 'user' %>

Name

<%= text_field 'user', 'name'  %>

<%= render :partial => 'users/name' %>
<%= render :partial => 'users/email' %>
<%= render :partial => 'users/password' %>
<%= render :partial => 'users/prefs' %>

<%= error_messages_for 'user' %>

Name

<%= text_field 'user', 'name'  %>

<%= render :partial => 'name' %>
<%= render :partial => 'email' %>
<%= render :partial => 'password' %>
<%= render :partial => 'prefs' %>


drop edit link in accounting, belongs to booking

Account <%= @account.title %>

    <%= sort_header('value_date', 'Datum') %>
    Text
    Belastung
    Gutschrift
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%= in_place_editor_field :booking, :in_place_value_date %>

      <%= in_place_editor_field :booking, :title %>
      <%= '
' unless booking.comments.empty? %>
      <%= in_place_editor_field :booking, :comments %>

    <%= in_place_editor_field :booking, :in_place_amount if booking.debit_account == @account %>
    <%= in_place_editor_field :booking, :in_place_amount if booking.credit_account == @account %>
    <%= currency_fmt(total_credit - total_debit) %>

      <%= link_to h(booking.in_place_value_date), :controller => :bookings, :action => :show, :id => booking %>
      <%= link_to image_tag('insert_booking.png'), :controller => :bookings, :action => :new %>
      <%= link_to image_tag('delete.png'), { :controller => :bookings, :action => 'destroy', :id => booking }, :confirm => 'Sicher?', :method => :post %>

  <% end %>

    Umsatz

    <%= currency_fmt(total_credit) %>
    <%= currency_fmt(total_debit) %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= currency_fmt(total_credit - total_debit) %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>

Account <%= @account.title %>

    <%= sort_header('value_date', 'Datum') %>
    Text
    Belastung
    Gutschrift
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%= in_place_editor_field :booking, :in_place_value_date %>

      <%= in_place_editor_field :booking, :title %>
      <%= '
' unless booking.comments.empty? %>
      <%= in_place_editor_field :booking, :comments %>

    <%= in_place_editor_field :booking, :in_place_amount if booking.debit_account == @account %>
    <%= in_place_editor_field :booking, :in_place_amount if booking.credit_account == @account %>
    <%= currency_fmt(total_credit - total_debit) %>

      <%= link_to h(booking.in_place_value_date), :controller => :bookings, :action => :show, :id => booking %>
      <%= link_to 'Edit', { :controller => :bookings, :action => :edit, :id => booking }, :method => :post %>
      <%= link_to image_tag('insert_booking.png'), :controller => :bookings, :action => :new %>
      <%= link_to image_tag('delete.png'), { :controller => :bookings, :action => 'destroy', :id => booking }, :confirm => 'Sicher?', :method => :post %>

  <% end %>

    Umsatz

    <%= currency_fmt(total_credit) %>
    <%= currency_fmt(total_debit) %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= currency_fmt(total_credit - total_debit) %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>


currently, the user and group directories don't work at all if you are not logged in. well, then, don't show them for now.

<%= render :partial => 'layouts/menu_login' %>

  <%- if logged_in? -%>
    <%- if current_site.network -%>
      <li id='menu_home' class='<%= @active_tab == :home ? 'active' : '' %>'>
        <%= link_to_active 'Home'[:menu_home], '/', @active_tab == :home %>

    <%- end -%>
    <li id='menu_me' class='<%= @active_tab == :me ? 'active' : '' %>'>
      <%= link_to_active 'Me'[:menu_me], '/me/dashboard', @active_tab == :me %>

  <%- else -%>
    <li class='<%= @active_tab == :home ? 'active' : '' %>'>
      <%= link_to_active "Home"[:menu_home], '/', @active_tab == :home %>

  <%- end -%>

  <%# for now, i am disabling these tabs when not logged in. why? because
      the controllers currently bomb out in bad ways if you are not logged in. %>
  <%- if logged_in? -%>
  <li id='menu_people' class='<%= @active_tab == :people ? 'active' : '' %>'>
    <%= link_to_active "People"[:menu_people], people_url, @active_tab == :people %>

  <li id='menu_groups' class='<%= @active_tab == :groups ? 'active' : '' %>'>
    <% url = logged_in? ? groups_url(:action => :my) : groups_url %>
    <%= link_to_active "Groups"[:menu_groups], url, @active_tab == :groups %>

  <%- if current_site.has_networks? -%>
    <li id='menu_networks' class='<%= @active_tab == :networks ? 'active' : '' %>'>
      <% url = logged_in? ? networks_url(:action => :my) : networks_url %>
      <%= link_to_active "Networks"[:menu_networks], url, @active_tab == :networks %>

  <%- end -%>
  <%- end -%>

  <%- if logged_in? and current_site.chat? -%>
  <li class='<%= @active_tab == :chat ? 'active' : '' %>'>
    <%= link_to_active "Chat"[:menu_chat], '/chat', @active_tab == :chat %>

  <%- end -%>

  <%= call_hook :top_menu %>

<%= render :partial => 'layouts/menu_login' %>

  <%- if logged_in? -%>
    <%- if current_site.network -%>
      <li id='menu_home' class='<%= @active_tab == :home ? 'active' : '' %>'>
        <%= link_to_active 'Home'[:menu_home], '/', @active_tab == :home %>

    <%- end -%>
    <li id='menu_me' class='<%= @active_tab == :me ? 'active' : '' %>'>
      <%= link_to_active 'Me'[:menu_me], '/me/dashboard', @active_tab == :me %>

  <%- else -%>
    <li class='<%= @active_tab == :home ? 'active' : '' %>'>
      <%= link_to_active "Home"[:menu_home], '/', @active_tab == :home %>

  <%- end -%>

  <li id='menu_people' class='<%= @active_tab == :people ? 'active' : '' %>'>
    <%= link_to_active "People"[:menu_people], people_url, @active_tab == :people %>

  <li id='menu_groups' class='<%= @active_tab == :groups ? 'active' : '' %>'>
    <%= link_to_active "Groups"[:menu_groups], groups_url(:action => :my), @active_tab == :groups %>

  <%- if current_site.has_networks? -%>
    <li id='menu_networks' class='<%= @active_tab == :networks ? 'active' : '' %>'>
      <%= link_to_active "Networks"[:menu_networks], networks_url(:action => :my), @active_tab == :networks %>

  <%- end -%>

  <%- if logged_in? and current_site.chat? -%>
  <li class='<%= @active_tab == :chat ? 'active' : '' %>'>
    <%= link_to_active "Chat"[:menu_chat], '/chat', @active_tab == :chat %>

  <%- end -%>

  <%= call_hook :top_menu %>


Fix sentence in frontpage

Fix sentence in frontpage

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

Entrada en vigor de la ley de transparencia en Navarra

El 28 de diciembre entra en vigor la Ley Foral de Transparencia y Gobierno Abierto de Navarra, la primera ley de transparencia que se aprueba en España, único país de la Unión Europea que, junto a Luxemburgo y Chipre, aún no ha promulgado una norma semejante.

    			<form action="http://tuderechoasaber.us4.list-manage.com/subscribe/post?u=9416fe6b76f2c3f985c1f8e0f&id=36f187e6e2" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank">

¿Quieres estar informado de todas las novedades? Suscríbete a nuestro boletín:

<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="dirección de correo" required="true" style="width:90%">

<input type="submit" value="Suscríbeme" name="subscribe" id="mc-embedded-subscribe" style="border-color:silver">

    			</form>

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

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

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(item['description'].to_s, "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>

<% view_cache :ttl => 5.minutes.to_i, :tag => I18n.locale do %>

<%= _("Ejerce tu derecho a saber.") %>

1

2

3

<%= _("Para obtener información de instituciones públicas:") %>

<%= _("Piensa una pregunta para un organismo público.") %>

<%= _("Nosotros enviamos la pregunta por ti.") %>

<%= _("Te avisamos cuando haya una respuesta.") %>

            <%= link_to _("Preguntar »"), body_index_path %>

            <%= link_to _("¿Contestarán? »"), help_requesting_path(:anchor => 'making_requests') %>

Entrada en vigor de la ley de transparencia en Navarra

El 28 de diciembre entra en vigor la Ley Foral de Transparencia y Gobierno Abierto de Navarra, la primera ley de transparencia que se aprueba en España, único país de la Unión Europea que, junto a Malta y Chipre, aún no ha promulgado una norma semejante.

    			<form action="http://tuderechoasaber.us4.list-manage.com/subscribe/post?u=9416fe6b76f2c3f985c1f8e0f&id=36f187e6e2" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank">

¿Quieres estar informado de todas las novedades? Suscríbete a nuestro boletín:

<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="dirección de correo" required="true" style="width:90%">

<input type="submit" value="Suscríbeme" name="subscribe" id="mc-embedded-subscribe" style="border-color:silver">

    			</form>

Twittear

<%= _("Haz una búsqueda entre las peticiones ya realizadas:") %>

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

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

              <% end %>

<%= _("Novedades") %>

                <% 0.upto(3).each do |position|
                    item = @blog_items[position];
                    break if item.nil? %>

                  <div class="frontpage-blog-post <%= position.even? ? 'left' : 'right' %>">
                    <img src="<%= item['thumbnail'] %>" width="278" height="128"/>

                      <a href='<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>'><%= h item['title'] %>

<%= h excerpt(item['description'].to_s, "", 200) %>

<a href="<%= "#{blog_url}\##{Time.parse(item['pubDate'][0]).to_i}" %>"><%= _("Leer más »") %>

                  <% if position.odd? %>

                  <% end %>
                <% end %>

<a href="<%= blog_url %>"><%= _("Más novedades »") %>

<%= _("Peticiones destacadas") %>

                <% @featured_requests.each do |featured_request| %>
                <%= render :partial => 'track/tracking_request_links',
                      :locals => {
                        :track_thing => TrackThing.create_track_for_request(featured_request),
                        :own_request => featured_request.user == @user,
                        :location => "frontpage"
                      } %>
                <% end %>

<% end %>


ActionItem152: adding a button to close login screen if in lightbox

git-svn-id: 43659daf80e124e0b603d67096418e58e4f21099@1231 3f533792-8f58-4932-b0fe-aaf55b0a4547

<%= _('Login') %>

<% labelled_form_for :user, @user, :url => { :controller => 'account', :action => 'login' } do |f| %>

<%= display_form_field(_('Login'), text_field_tag(:login) ) %>

<%= display_form_field(_('Password'), password_field_tag(:password) ) %>

<% button_bar do %>
  <%= submit_button( 'login', _('Log in') )%>
  <%= lightbox_close_button(_('Cancel')) if lightbox? %>
<% end %>

<% end %>

<%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>

<%= link_to _("I want to be an user!"), :controller => 'account', :action => 'signup' %>

<%= _('Login') %>

<% labelled_form_for :user, @user, :url => { :controller => 'account', :action => 'login' } do |f| %>

<%= display_form_field(_('Login'), text_field_tag(:login) ) %>

<%= display_form_field(_('Password'), password_field_tag(:password) ) %>

<% button_bar do %>
  <%= submit_button( 'login', _('Log in') )%>
<% end %>

<% end %>

<%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>

<%= link_to _("I want to be an user!"), :controller => 'account', :action => 'signup' %>


use Soll and Haben and switch columns in account show

Account <%= @account.title %>

    <%= sort_header('value_date', 'Datum') %>
    Text
    Soll
    Haben
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%= in_place_editor_field :booking, :in_place_value_date %>

      <%= in_place_editor_field :booking, :title %>
      <%= '
' unless (booking.comments.nil? or booking.comments.empty?) %>
      <%= in_place_editor_field :booking, :comments %>

    <%= (booking.credit_account == @account) ? "#{in_place_editor_field(:booking, :in_place_amount)} #{h(booking.credit_currency)}" : "#{link_to(h(booking.credit_account.number), {:controller => 'accounts', :action => :show, :id => booking.credit_account}, :title => h(booking.credit_account.title))}" %>
    <%= (booking.debit_account == @account) ? "#{in_place_editor_field(:booking, :in_place_amount)} #{h(booking.debit_currency)}" : "#{link_to(h(booking.debit_account.number), {:controller => 'accounts', :action => :show, :id => booking.debit_account}, :title => h(booking.debit_account.title))}" %>
    <%= currency_fmt(total_credit - total_debit) %>

      <%= link_to h(booking.in_place_value_date), :controller => :bookings, :action => :show, :id => booking %>
      <%= link_to image_tag('edit_22.png'), :controller => :bookings, :action => :edit, :id => booking %>
      <%= link_to image_tag('remove_22.png'), { :controller => :bookings, :action => 'destroy', :id => booking }, :confirm => 'Sicher?', :method => :post %>

  <% end %>

    Umsatz

    <%= currency_fmt(total_credit) %>
    <%= currency_fmt(total_debit) %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= currency_fmt(total_credit - total_debit) %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>

Account <%= @account.title %>

    <%= sort_header('value_date', 'Datum') %>
    Text
    Belastung
    Gutschrift
    Saldo
    Valuta

  <% total_debit = 0; total_credit = 0 %>
  <% for booking in @account.bookings %>
  <% @booking = booking %>
  <% total_debit += booking.amount if booking.debit_account == @account %>
  <% total_credit += booking.amount if booking.credit_account == @account %>

    <%= in_place_editor_field :booking, :in_place_value_date %>

      <%= in_place_editor_field :booking, :title %>
      <%= '
' unless (booking.comments.nil? or booking.comments.empty?) %>
      <%= in_place_editor_field :booking, :comments %>

    <%= (booking.debit_account == @account) ? "#{in_place_editor_field(:booking, :in_place_amount)} #{h(booking.debit_currency)}" : "#{link_to(h(booking.debit_account.number), {:controller => 'accounts', :action => :show, :id => booking.debit_account}, :title => h(booking.debit_account.title))}" %>
    <%= (booking.credit_account == @account) ? "#{in_place_editor_field(:booking, :in_place_amount)} #{h(booking.credit_currency)}" : "#{link_to(h(booking.credit_account.number), {:controller => 'accounts', :action => :show, :id => booking.credit_account}, :title => h(booking.credit_account.title))}" %>
    <%= currency_fmt(total_credit - total_debit) %>

      <%= link_to h(booking.in_place_value_date), :controller => :bookings, :action => :show, :id => booking %>
      <%= link_to image_tag('edit_22.png'), :controller => :bookings, :action => :edit, :id => booking %>
      <%= link_to image_tag('remove_22.png'), { :controller => :bookings, :action => 'destroy', :id => booking }, :confirm => 'Sicher?', :method => :post %>

  <% end %>

    Umsatz

    <%= currency_fmt(total_credit) %>
    <%= currency_fmt(total_debit) %>

    Aktueller Kontostand (per <%= DateTime.now.strftime("%d.%m.%Y %H:%M") %>)

    <%= currency_fmt(total_credit - total_debit) %>

<%= link_to 'Edit', :action => 'edit', :id => @account %> |
<%= link_to 'Back', :action => 'list' %>


updated view with entities_list section extracted in partial

<% detail_ids = [] %>

<%=h( t("madb_entity_details", :vars => { 'entity' => t(@entity.name, :scope => "account")}) )%>

<%= help_info("madb_help_info_entities_view_intro")%>

<% @crosstab_object.each  do |o| %>
        <% next if o.id=="id" %>
        <% detail = Detail.find(o.id, :include => [:data_type]) %>
        <% detail_class = class_from_name(detail.data_type.class_name) %>

<%=t(detail.name, {:scope => "account"})  %>:
          <%=detail_class.format_detail :value => o.value, :controller => self %>

<% end %>

<%= link_to( t("madb_edit"), :controller => "entities", :action => "edit", :id => params["id"], :popup => params["popup"] ) %>

<%=t("madb_related_entities")%>

<%= help_info("madb_help_info_entities_views_related_entities")%>

<% [ {:from => "parent", :to => "child"}, {:from => "child", :to => "parent"} ].each do |type| %>
  <%= render :partial => 'related_entities', :locals => { :entity => @entity, :type => type }  %>

<% end %>

<% detail_ids = [] %>

<%=h( t("madb_entity_details", :vars => { 'entity' => t(@entity.name, :scope => "account")}) )%>

<%= help_info("madb_help_info_entities_view_intro")%>

<% @crosstab_object.each  do |o| %>
        <% next if o.id=="id" %>
        <% detail = Detail.find(o.id, :include => [:data_type]) %>
        <% detail_class = class_from_name(detail.data_type.class_name) %>

<%=t(detail.name, {:scope => "account"})  %>:
          <%=detail_class.format_detail :value => o.value, :controller => self %>

<% end %>

<%= link_to( t("madb_edit"), :controller => "entities", :action => "edit", :id => params["id"], :popup => params["popup"] ) %>

<%=t("madb_related_entities")%>

<%= help_info("madb_help_info_entities_views_related_entities")%>

<% [ {:from => "parent", :to => "child"}, {:from => "child", :to => "parent"} ].each do |type| %>
  <% if @entity.send("relations_to_#{type[:to].pluralize}").size>0 %>

    <% @entity.send("relations_to_#{type[:to].pluralize}").each do |relation| %>
    <% relation_name = relation.send("from_#{type[:from]}_to_#{type[:to]}_name") %>
    <%# Used by entity_linked event to identify the linkable list who fired the event %>
    <% self_id = type[:from]+"_id" %>
    <% prefix = "e_#{relation.id}_from_#{type[:from]}_to_#{type[:to]}" %>
    <% linked_entity = relation.send(type[:to]) %>
    <% yui_linked_list = "#{prefix}_linked_list" %>
    <% yui_linkable_list ="#{prefix}_linkable_list" %>
    <% yui_form ="#{prefix}_form" %>
    <%# CSS class given to all elements (and to buttons only) used to add a new related instance %>
    <% addition_element = "#{prefix}_addition" %>
    <% addition_button = "#{prefix}_button" %>
    <% list_id = "#{prefix}_#{type[:to]}_div" %>
    <%# initialise variables%>
    <% link_to_many = relation.send("#{type[:to]}_side_type").name=='many' %>
    <% link_from_many = relation.send("#{type[:from]}_side_type").name=='many' %>

<%= t(relation_name,{:scope => "account"}) %>

          <div id="<%=list_id%>_add_<%=type[:to]%>_links" class="button_style <%= addition_element %> <%= addition_button %>">
            <%# button to Link to existing instance%>
            <span id="<%=list_id%>_add_existing_<%=type[:to]%>_link">
              <%= t("madb_link_to_existing_entity", { :vars => { 'entity' => t( relation.send(type[:to]).name , :scope => "account")}}) %>

            <%# button to Link to a new instance that will be created with the form displayed%>
            <span class="" id="<%=list_id%>_add_new_<%=type[:to]%>_link">
              <%=link_to_function t("madb_add_new_related_entity" ,{ :vars => { 'entity' => t(relation.send(type[:to]).name, :scope => "account")}}), "
              if (document.getElementById('add_new_#{type[:to]}_#{prefix}_div').childNodes.length<1)
              {
              new Ajax.Updater('add_new_#{type[:to]}_#{prefix}_div',  '#{url_for :controller => "entities", :action => "link_to_new" , :id => relation.send(type[:to]).id, "#{type[:from]}_id".to_sym => params["id"], :relation_id=> relation.id, :embedded => "add_new_#{type[:to]}_#{prefix}_div", :update => list_id}  ', {evalScripts:true, onComplete:function(request){
               }
              });
              }
              Element.toggleClassName('#{yui_form}_container', 'hidden');

                "  %>

<div id="<%= yui_linkable_list %>_container" class="tool_in_page hidden <%= addition_element %>">
  <div id="<%= yui_linkable_list %>" >

  <a href="#" onclick="Element.toggleClassName('<%= yui_linkable_list%>_container', 'hidden');return false;"><%= t('madb_done')%>

<div id="<%= yui_form %>_container" class="tool_in_page hidden  <%= addition_element %>">
  <div id="<%= yui_form %>">

  <a href="#" onclick="Element.toggleClassName('<%= yui_form%>_container', 'hidden');return false;"><%= t('madb_done')%>

          <div id="<%=yui_linked_list%>">

          <div id="add_new_<%=type[:to]%>_<%=prefix%>_div" style="display:none; ">

          <div id="link_existing_<%=type[:to]%>_<%=prefix%>_div" style="display:none; ">

      <% end %>

  <% end %>

  <% end %>


Fill in license details.

Fill in license details.

<% form_tag :action => "finish" do %>

Area to Export

    <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>

    <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %>
    <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %>

    <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>

      Drag a box with control held down to select an area to export

Format to Export

      <%= radio_button_tag("format", "osm") %>OpenStreetMap XML Data

      <%= radio_button_tag("format", "mapnik") %>Mapnik Image

      <%= radio_button_tag("format", "osmarender") %>Osmarender Image

Licence

OpenStreetMap data is licensed under the Creative Commons Attribution-ShareAlike 2.0 license.

    </div

Options

Format <%= select_tag("mapnik_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"], ["SVG", "svg"], ["PDF", "pdf"], ["Postscript", "ps"]], "png")) %>

Scale 1 : <%= text_field_tag("mapnik_scale", nil, :size => 8) %> (max 1 : )

Options

Format <%= select_tag("osmarender_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"]], "png")) %>

Zoom <%= select_tag("osmarender_zoom", options_for_select([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])) %>

<%= submit_tag "Export", :id => "export_commit" %>

<% end %>

<% form_tag :action => "finish" do %>

Area to Export

    <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>

    <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %>
    <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %>

    <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>

      Drag a box with control held down to select an area to export

Format to Export

      <%= radio_button_tag("format", "osm") %>OpenStreetMap XML Data

      <%= radio_button_tag("format", "mapnik") %>Mapnik Image

      <%= radio_button_tag("format", "osmarender") %>Osmarender Image

Licence

OSM license agreement blah blah blah...

    </div

Options

Format <%= select_tag("mapnik_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"], ["SVG", "svg"], ["PDF", "pdf"], ["Postscript", "ps"]], "png")) %>

Scale 1 : <%= text_field_tag("mapnik_scale", nil, :size => 8) %> (max 1 : )

Options

Format <%= select_tag("osmarender_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"]], "png")) %>

Zoom <%= select_tag("osmarender_zoom", options_for_select([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])) %>

<%= submit_tag "Export", :id => "export_commit" %>

<% end %>


trying to get avatars/headers uploads to work (x16)

git-svn-id: 295275ead0c997ff8920a9abe88dec0903829be9@216 9c008b19-a030-0410-9975-d76d301b4276

<%= render :partial => 'headers/new' %>

<% for header in @headers %>

<%= link_to image_tag(header.public_filename), header_path(header) %>

<% end %>

	<%= link_to('View All Headers »', headers_path) %>

<%= render :partial => 'uploads/_new' %>

<% for header in @headers %>

<%= link_to image_tag(header.public_filename), header_path(header) %>

<% end %>

	<%= link_to('View All Headers »', headers_path) %>