Skip to content

Commit

Permalink
tidied UI
Browse files Browse the repository at this point in the history
  • Loading branch information
paulwalk committed Oct 24, 2010
1 parent c66d0f6 commit d387756
Show file tree
Hide file tree
Showing 33 changed files with 318 additions and 602 deletions.
83 changes: 0 additions & 83 deletions app/controllers/clusters_controller.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/clusters_helper.rb

This file was deleted.

3 changes: 0 additions & 3 deletions app/models/cluster.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/models/topic.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Topic < ActiveRecord::Base
belongs_to :cluster
belongs_to :topiccluster
has_and_belongs_to_many :usecases
end
24 changes: 0 additions & 24 deletions app/views/clusters/edit.html.erb

This file was deleted.

30 changes: 0 additions & 30 deletions app/views/clusters/index.html.erb

This file was deleted.

23 changes: 0 additions & 23 deletions app/views/clusters/new.html.erb

This file was deleted.

18 changes: 0 additions & 18 deletions app/views/clusters/show.html.erb

This file was deleted.

5 changes: 2 additions & 3 deletions app/views/shared/_menu_bar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

<div id="navibar">
<%= link_to_unless_current 'Home',"#{ActionController::Base.relative_url_root}/" %> |
<%= link_to_unless_current 'Clusters',"#{ActionController::Base.relative_url_root}/clusters" %> |
<%= link_to_unless_current 'Topic Clusters',"#{ActionController::Base.relative_url_root}/topicclusters" %> |
<%= link_to_unless_current 'Topics',"#{ActionController::Base.relative_url_root}/topics" %> |
<%= link_to_unless_current 'Use Cases',"#{ActionController::Base.relative_url_root}/usecases" %> |
<%= link_to_unless_current 'Vocabulary Types',"#{ActionController::Base.relative_url_root}/vocabtypes" %> |
<%= link_to_unless_current 'Vocabularies',"#{ActionController::Base.relative_url_root}/vocabs" %> |
<%= link_to_unless_current 'Usages',"#{ActionController::Base.relative_url_root}/usages" %>
<%= link_to_unless_current 'Vocabularies',"#{ActionController::Base.relative_url_root}/vocabs" %>

<p style="color: green"><%= flash[:notice] %></p>
</div>
Expand Down
33 changes: 10 additions & 23 deletions app/views/topics/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
<h1>Editing topic</h1>
<%= render :partial => "shared/menu_bar"%>

<% form_for(@topic) do |f| %>
<%= f.error_messages %>
<h2>Editing Topic: <span class="entity-title"><%= @topic.name %></span></h2>

<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :url %><br />
<%= f.text_field :url %>
</p>
<p>
<%= f.label :note %><br />
<%= f.text_area :note %>
</p>
<p>
<%= f.label :cluster %><br />
<%= f.text_field :cluster %>
</p>
<p>
<%= f.submit 'Update' %>
</p>
<% end %>
<div id="tabs">
<ul>
<li><a href="#tabs-1">General</a></li>
</ul>
<div id="tabs-1">
<%= render :partial => "form" %>
</div>
</div>

<%= link_to 'Show', @topic %> |
<%= link_to 'Back', topics_path %>
2 changes: 1 addition & 1 deletion app/views/topics/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<% @topics.each do |topic| %>
<tr>
<td><%= link_to topic.name, topic %></td>
<td><%= link_to topic.cluster.name, topic.cluster %></td>
<td><%= link_to topic.topiccluster.name, topic.topiccluster %></td>
<td class="panel-grid-operations"><%= link_to 'Edit', edit_topic_path(topic) %> | <%= link_to 'Destroy', topic, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
Expand Down
36 changes: 12 additions & 24 deletions app/views/topics/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
<h1>New topic</h1>
<%= render :partial => "shared/menu_bar"%>

<% form_for(@topic) do |f| %>
<%= f.error_messages %>
<h2>New Topic</h2>
<div id="tabs">
<ul>
<li><a href="#tabs-1">General</a></li>
</ul>
<div id="tabs-1">
<%= render :partial => "form" %>
</div>
</div>

<%= link_to 'Back', topics_path %>

<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :url %><br />
<%= f.text_field :url %>
</p>
<p>
<%= f.label :note %><br />
<%= f.text_area :note %>
</p>
<p>
<%= f.label :cluster %><br />
<%= f.text_field :cluster %>
</p>
<p>
<%= f.submit 'Create' %>
</p>
<% end %>

<%= link_to 'Back', topics_path %>
42 changes: 26 additions & 16 deletions app/views/topics/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
<p>
<b>Name:</b>
<%=h @topic.name %>
</p>
<%= render :partial => "shared/menu_bar"%>

<p>
<b>Url:</b>
<%=h @topic.url %>
</p>
<h2>Showing Topic: <span class="entity-title"><%= @topic.name %></span></h2>

<p>
<b>Note:</b>
<%=h @topic.note %>
</p>
<div id="tabs">
<ul>
<li><a href="#tabs-1">General</a></li>
</ul>
<div id="tabs-1">
<p>
<b>Name:</b>
<%=h @topic.name %>
</p>

<p>
<b>Cluster:</b>
<%=h @topic.cluster %>
</p>
<p>
<b>Url:</b>
<%=h @topic.url %>
</p>

<p>
<b>Note:</b>
<%=h @topic.note %>
</p>

<p>
<b>Cluster:</b>
<%=h @topic.topiccluster.name %>
</p>
</div>
</div>

<%= link_to 'Edit', edit_topic_path(@topic) %> |
<%= link_to 'Back', topics_path %>
Loading

0 comments on commit d387756

Please sign in to comment.