<h2><%= I18n.t(:project) %>: <%= @project.name %> (<a href="/projects/<%= @project.id %>/edit"><%= I18n.t(:edit) %></a>)</h2>

<p><%= I18n.t(:configuration_file) %>:
  <code><i><%= @project.config_file_path %></i></code> <!--(<a href="#" onclick="$('#config_options_div').toggle();">Show all options</a>) -->
</p>

<form name="update_project_form" method="post" action="/projects/<%= @project.id %>/update_config">
	<div class="" id="project-config-xml-div" style="margin-right: 17px;">
		<textarea id="project_config_xml" name="config" cols="100" class="span9" rows="30" style="font-size: 12px;"><%= @project.config_file_content %></textarea>
	</div>
	
  <div class="form-actions" style="margin: 8px; margin-left: 40px;">
    <input type="submit" value="<%= I18n.t(:save) %>" class="btn btn-primary"/>
    <a href="/" class="btn btn-default"><%= I18n.t(:cancel) %></a>
  </div>

</form>


<script type="text/javascript">
$(document).ready(function(){
  var te_html = document.getElementById("project_config_xml");
	window.editor = CodeMirror.fromTextArea(te_html, {
	   lineNumbers: true,
     lineWrapping: true,
     mode: "htmlmixed",
     extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }},
     foldGutter: true,
     gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
	  });
  editor.foldCode(CodeMirror.Pos(13, 0));
});
</script>