Permalink
Browse files

Merge branch 'master' of git@github.com:Smudge/newstc

  • Loading branch information...
2 parents 741aff6 + 258d847 commit f5b216cf9d5c373891a3da6e69202782a2a38b3f @iamringo iamringo committed Aug 19, 2009
@@ -139,6 +139,7 @@ def set_sources
end
if params[:department_wide_locations] && current_user.is_admin_of?(current_department)
@notice.location_sources << current_department
+ @notice.departments << current_department
@notice.loc_groups << current_department.loc_groups
@notice.locations << current_department.locations
elsif params[:for_location_groups]
View
@@ -26,6 +26,10 @@ def default
validates_uniqueness_of :name
validates_uniqueness_of :admin_permission_id
+ def get_links
+ self.notices.select{|n| n.useful_link}
+ end
+
# has_and_belongs_to_many :users
private
def create_permissions
@@ -38,3 +42,4 @@ def update_permissions
end
end
+
@@ -13,9 +13,7 @@
<li><%= link_to "Your Profile", edit_user_profile_path(current_user.login) %></li> <br/>
<% end %>
<h3>Useful Links</h3>
- <li><%=link_to "Weke", "http://weke.its.yale.edu/" %></li>
- <li><%=link_to "RT", "http://uhu.its.yale.edu/" %></li>
- <li><%=link_to "STC Terms of Service", "http://www.yale.edu/its/stc/terms.html" %></li>
+ <%= render :partial => 'notices/useful_links', :collection => current_department.get_links %>
</ul>
<div id="contentNav">
<% end %>
@@ -1,5 +1,10 @@
if @notice.errors.empty?
- page.replace_html "all_notices", :partial => 'notices/all_notices'
+ if @notice.useful_link
+ page.replace_html "report_links", :partial => 'notices/useful_links', :collection => @report.get_links
+ page.replace_html "dashboard_links", :partial => 'notices/useful_links', :collection => current_department.get_links
+ else
+ page.replace_html "all_notices", :partial => 'notices/all_notices'
+ end
if current_user.current_shift
page.replace_html "message_center", :partial => 'notices/notice', :collection => current_user.current_shift.report.get_notices
end
@@ -8,35 +8,30 @@
<div id="new_notice">
<%= link_to_post_a_new_notice %>
</div>
-
</fieldset>
<%= periodically_call_remote :url => { :controller => "notices", :action => "update_message_center"}, :frequency => 5*60 -%>
- <div id="report_data_objects">
- <fieldset>
- <legend>Update Info</legend>
- <%= render :partial => 'data_objects/report_data_object', :collection => @report.data_objects %>
- </fieldset>
- </div>
-
- <div id = "useful_links">
- <fieldset>
- <legend>Useful Links</legend>
- <%# PARTIALIZE!! %>
-
- <% for l in @report.get_links do %>
- <% l = l.content.split("|$|") %>
- <%= link_to "#{l.first}", "#{l.last}", :popup => true %>
- <br />
- <%end%>
- <!-- -->
+ <div id="report_data_objects">
+ <fieldset>
+ <legend>Data Objects</legend>
+ <%= render :partial => 'data_objects/report_data_object', :collection => @report.data_objects %>
+ </fieldset>
+ </div>
+
+ <div id = "useful_links_div">
+ <fieldset>
+ <legend>Useful Links</legend>
+ <div id = "report_links">
+ <ul id = "useful_links">
+ <%= render :partial => 'notices/useful_links', :collection => @report.get_links %>
<%= link_to_post_a_useful_link %>
- </fieldset>
+ </ul>
</div>
+ </fieldset>
+ </div>
-
- <div id="active_report_area">
+ <div id="active_report_area">
<h2>Update Your Report</h2>
<%= render :partial => 'new_report_item_form' %>
@@ -53,13 +48,10 @@
<div class='clear'></div>
</div> <%# close active_report_area %>
-
<% elsif !@report.departed %>
- <p>This report is still in progress.</p>
-<% end %>
-
-<% if !@report.departed %>
-<%#= javascript_include_tag 'leave_confirm'%>
-<% end %>
-
+<p>This report is still in progress.</p>
+ <% end %>
+ <% if !@report.departed %>
+ <%#= javascript_include_tag 'leave_confirm'%>
+ <% end %>
@@ -5,6 +5,59 @@ html {
overflow-y: scroll;
}
+<<<<<<< HEAD:public/stylesheets/application.css
+a.action_with_icon{
+ vertical-align: middle;
+}
+
+img.mini_icon {
+ vertical-align: middle;
+ width: 1.2em;
+ height: 1.2em;
+}
+
+table, td, th{
+ border:1px solid #666;
+ padding: 2px;
+ border-collapse:collapse;
+}
+
+th{
+ background: #123456; /*415578;*/
+ border:1px solid black;
+ color: white;
+}
+
+#flash_error {
+ background-color: #FCC;
+ border: solid 1px #C66;
+ font-size:11px;
+ margin-top:10px;
+ padding:5px 8px;
+}
+
+#flash_warning {
+ background-color:#FFF0AA;
+ border:1px solid #908C99;
+}
+
+#flash_notice {
+ background-color:#98EEC3;
+ border:1px solid #21A454;
+ font-size:11px;
+ margin-top:10px;
+ padding:5px 8px;
+}
+
+#flash_big_notice {
+ background-color:#FFCCCC;
+ border:1px solid #CC6666;
+ font-size:11px;
+ margin-top:10px;
+ padding:5px 8px;
+}
+
+/* Main Styles and IDs */
body {
color: #000;
margin: 0pt;
@@ -179,8 +232,12 @@ ul#application_tabs a:hover {
line-height: 1.75em;
}
-li#useful_links {
+ul#useful_links {
list-style-type: none;
+ float: left;
+ text-align: left;
+ list-style-position: outside;
+ margin-left: 0px;
}
ul#navigationList {
@@ -682,3 +739,4 @@ th{
font-size: 12px;
list-style: disc;
}
+
@@ -14,6 +14,7 @@
#report_relative_size {
width: 49.5%;
float: right;
+ clear: right;
}
#report_view {
@@ -24,7 +25,8 @@
#report_view .list_report_item_even {
background: #f5f5f5;
-}
+}ered List Items to Do Just ...
+I can still remember the day I discovered the li
#report_view .list_report_item_odd {
background: #e6e6fa;
@@ -70,13 +72,13 @@
padding: 4px;
}
-#useful_links {
+#useful_links_div {
width: 49.5%;
float: right;
margin-bottom: 5px
}
-#useful_links fieldset {
+#useful_links_div fieldset {
padding: 5px;
border: 1px solid gray;
background-color:#DDDDFF

0 comments on commit f5b216c

Please sign in to comment.