Web page attachments - download vs inline with ColdFusion

Tags: 

Here's a quick tip that'll help make life easier for anyone who's trying to use ColdFusion's CFCONTENT tag to send content to the browser. When you're sending a file to the web browser using CFCONTENT you can do it either as an inline file, i.e. the browser will probably try to display it, or you can send it as a file to be downloaded. The only problem is that to do the latter you can't do it with just the CFCONTENT tag, you first need to tell the browser that you're sending a file and then send it, for example:
[source:html]
[/source]
To pop open the magic Save As dialog in the browser you need to send the Content-disposition HTTP header and tell it you're sending an attached file, along with the filename. Easy when you know how.

Improve Redmine's client management options

Tags: 

Out of the box Redmine doesn't look like it has a lot of options for managing clients, but you'd be wrong - with a little customizing you can at least fake it. There are two parts to this - set up a new user group and add some custom fields for users.

The first step is to create a new user group called Client:

  • Log into the Administration -> Roles & Permissions page and click on New Role
  • Set the name to "Client" and give them the follow permissions: Issues - add, add a note, change status, new file, new relation; News - add a comment; Documents - add, new file; Files - add. (adjust as you see fit)
  • Save what you've set and assign a user the Client role for a project.
  • Next time you view that project's Overview page it'll list them on the Members block as a Client

Simple but useful.

The second step is to round off the user information options by adding some custom fields.

  • Go to the Administration -> Custom Fields page and click on Users link.
  • Click on New Custom Field, set the name to "Company", leave the format as "text", set the min length to 0, the max length to e.g. 30, leave the regular expression field blank, leave the required option unchecked, and click Save.
  • Repeat for any other fields you want, e.g. Work Phone, Cell Phone, Work Address, etc.

Now any time you add a user you can give them the above information.

Putting these two together, now when you go to the Project Overview page you can see who the client is and by clicking on their name see their contact information.

N00b FAQ: belongs_to is singular

Tags: 

A little tidbit I forgot along the way - in Rails the belongs_to (1-to-many association directive at the 1 side) directive needs you to assign it a singular symbol and not a multiple, e.g.:
[source:ruby]class Product belongs_to :category
end[/source]

Samsung BlackJack or Blackberry Pearl? (UPDATED)

Any recommendation on which of the above phone to get? Our current carrier has them pretty cheap as refubs (I could get one for free by moving carrier, but that itself is complicated) and they're both tempting. The requirements I have are:

  • camera higher than VGA, preferably 2mp or more
  • PDA functionality - calendar, tasks, etc,
  • MP3 playback
  • Video playback of some sort

Things I don't need are:

  • Exclusive music or video deals - I'll supply my own, thanks.
  • 3G service, again the fancy stuff will copied over via USB first, I can cope with that.
  • Email - see above.

They'll both be set up to sync with our Mac at home, and thankfully there's lots of great software to do that, all of which seems to be written by MarkSpace.

So has anyone tried these, and if so which did you prefer?

UPDATE: They've sold out of the Blackjack. :-(

List bullet colors, a CSS annoyance

Tags: 

Something I've been asked to do several times over my career is to have a list in HTML with the bullet show up as a different color to the text. Unfortunatley the HTML & CSS standards don't allow this without some shoe-horning. You basically have two options:

  • Use an image
  • Set the color on the list that you want the bullets to be, then add another element within the LI (list item) that contains all the content and set its color to what the text should be.

The problem with the first option is that you have a separate file to download, the problem with the second is that you have to add erroneous tags for something that IMHO should be part of the standard.

Pages

Subscribe to Front page feed