myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2449] branches/neiss: made google maps API key s


From: noreply
Subject: [myexperiment-hackers] [2449] branches/neiss: made google maps API key site wide instead of per map
Date: Wed, 23 Jun 2010 09:37:23 -0400 (EDT)

Revision
2449
Author
dgc
Date
2010-06-23 09:37:23 -0400 (Wed, 23 Jun 2010)

Log Message

made google maps API key site wide instead of per map

Modified Paths

Diff

Modified: branches/neiss/app/controllers/maps_controller.rb (2448 => 2449)


--- branches/neiss/app/controllers/maps_controller.rb	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/app/controllers/maps_controller.rb	2010-06-23 13:37:23 UTC (rev 2449)
@@ -240,7 +240,7 @@
   def explore
     respond_to do |format|
       format.html {
-        @extra_head_content = "<script src="" type=\"text/_javascript_\"></script>"
+        @extra_head_content = "<script src="" type=\"text/_javascript_\"></script>"
         # explore.rhtml
       }
     end

Modified: branches/neiss/app/views/maps/edit.rhtml (2448 => 2449)


--- branches/neiss/app/views/maps/edit.rhtml	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/app/views/maps/edit.rhtml	2010-06-23 13:37:23 UTC (rev 2449)
@@ -30,10 +30,6 @@
 
   <br />
 
-  <p style="text-align: center;"><strong>API key: </strong><br /> <%= f.text_field :api_key, :size => 60 %></p>
-
-  <br />
-
   <p style="text-align: center;"><strong>Copyright statement: </strong><br /> <%= f.text_field :copyright_statement, :size => 60 %></p>
   <p style="text-align: center;"><strong>Copyright URL        </strong><br /> <%= f.text_field :copyright_url, :size => 60 %></p>
   <p style="text-align: center;"><strong>Copyright text:      </strong><br /> <%= f.text_field :copyright_text, :size => 60 %></p>

Modified: branches/neiss/app/views/maps/new.rhtml (2448 => 2449)


--- branches/neiss/app/views/maps/new.rhtml	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/app/views/maps/new.rhtml	2010-06-23 13:37:23 UTC (rev 2449)
@@ -30,10 +30,6 @@
 
   <br />
 
-  <p style="text-align: center;"><strong>API key: </strong><br /> <%= text_field_tag "map[api_key]", nil, :size => 60 %></p>
-
-  <br />
-
   <p style="text-align: center;"><strong>Copyright statement: </strong><br /> <%= text_field_tag "map[copyright_statement]", nil, :size => 60 %></p>
   <p style="text-align: center;"><strong>Copyright URL        </strong><br /> <%= text_field_tag "map[copyright_url]",       nil, :size => 60 %></p>
   <p style="text-align: center;"><strong>Copyright text:      </strong><br /> <%= text_field_tag "map[copyright_text]",      nil, :size => 60 %></p>

Modified: branches/neiss/app/views/maps/show.rhtml (2448 => 2449)


--- branches/neiss/app/views/maps/show.rhtml	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/app/views/maps/show.rhtml	2010-06-23 13:37:23 UTC (rev 2449)
@@ -76,13 +76,6 @@
 			<br/>
 
 			<p>
-			    <b>API key</b>
-			    <span><%=h @map.api_key %></span>
-			</p>
-			
-			<br/>
-			
-			<p>
 			    <b>Latitude</b>
 			    <span><%=h @map.latitude %></span>
 			</p>

Modified: branches/neiss/config/default_settings.yml (2448 => 2449)


--- branches/neiss/config/default_settings.yml	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/config/default_settings.yml	2010-06-23 13:37:23 UTC (rev 2449)
@@ -446,3 +446,9 @@
 rdfgen_enable: false
 
 rdfgen_tool:
+
+# google_maps_api_key - This is the google maps API key for this website for
+#                       the Map contributable type.
+
+google_maps_api_key: GoogleMapAPIKeyGoesHere
+

Modified: branches/neiss/config/schema.d/neiss.xml (2448 => 2449)


--- branches/neiss/config/schema.d/neiss.xml	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/config/schema.d/neiss.xml	2010-06-23 13:37:23 UTC (rev 2449)
@@ -8,7 +8,6 @@
     <column type="string"   name="title"/>
     <column type="text"     name="description"/>
     <column type="text"     name="description_html"/>
-    <column type="string"   name="api_key"/>
     <column type="text"     name="copyright_statement"/>
     <column type="string"   name="copyright_url"/>
     <column type="text"     name="copyright_text"/>

Modified: branches/neiss/lib/conf.rb (2448 => 2449)


--- branches/neiss/lib/conf.rb	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/lib/conf.rb	2010-06-23 13:37:23 UTC (rev 2449)
@@ -150,6 +150,10 @@
     self.fetch_entry('rdfgen_tool')
   end
 
+  def self.google_maps_api_key
+    self.fetch_entry('google_maps_api_key')
+  end
+
   # This method is required to create an administrator in the test fixtures
 
   def self.admins=(value)

Modified: branches/neiss/lib/rest.rb (2448 => 2449)


--- branches/neiss/lib/rest.rb	2010-06-23 10:42:46 UTC (rev 2448)
+++ branches/neiss/lib/rest.rb	2010-06-23 13:37:23 UTC (rev 2449)
@@ -1837,7 +1837,6 @@
 
     title               = parse_element(data, :text, '/map/title')     
     description         = parse_element(data, :text, '/map/description')           
-    api_key             = parse_element(data, :text, '/map/api_key')       
     copyright_statement = parse_element(data, :text, '/map/copyright_statement')                   
     copyright_url       = parse_element(data, :text, '/map/copyright_url')             
     copyright_text      = parse_element(data, :text, '/map/copyright_text')              
@@ -1850,7 +1849,6 @@
 
     ob.title               = title               if title                
     ob.description         = description         if description          
-    ob.api_key             = api_key             if api_key              
     ob.copyright_statement = copyright_statement if copyright_statement  
     ob.copyright_url       = copyright_url       if copyright_url        
     ob.copyright_text      = copyright_text      if copyright_text       

reply via email to

[Prev in Thread] Current Thread [Next in Thread]