The exchange is among details in a federal lawsuit filed by the counselor, who, ironically, was fired in 2010 for having sex with a Department of Correction employee on his desk at the prison about 60 miles east of Indianapolis.

In a ruling Monday, a three-judge federal appeals court panel said a district judge in Indiana was wrong to dismiss the discrimination and hostile work environment claims leveled by Connie J. Orton-Bell in connection with her dismissal. The ruling notes a "severely sexualized climate" at the state prison.

The order handed down by the 7th Circuit Court of Appeals panel details the atmosphere inside the prison as "saturated" with sexual comments aimed at female employees and a don't-ask-don't-tell attitude toward workers having sex on the job.

According to court records:

â?¢ A former superintendent told Orton-Bell she could not wear jeans like other workers on Fridays "because her ass looked so good that she would cause a riot." He was later fired for having sex with another female staff member.

â?¢ Male employees would congregate near the security point where female workers were "patted down" and would frequently make comments such as "they needed a cigarette after watching (Orton-Bell) get patted down because it was almost like having sex for them."

â?¢ Another superintendent, hired to replace the one who had been fired, "did not care" about employees having sex at work "as long as offenders were not involved."

â?¢ After the internal affairs investigation revealed night-shift employees were having sex on Orton-Bell's desk, the investigator explained, "This is a max(imum) security prison, staff having sex is of no concern to us."

â?¢ Orton-Bell and a major at the prison had sex on the desk in his office and used their work email accounts to schedule rendezvous and participate in "extensive explicit conversations about sexual position, preferences, and games."

Department of Correction spokesman Douglas S. Garrison said the state will review the appeals court ruling to determine "what additional legal steps are necessary."

"It should be noted," he added, "that state government and its personnel policies prohibit sexual harassment and inappropriate workplace conduct."

Because the case is pending, Garrison said he could not comment further on the allegations in the lawsuit.

Orton-Bell's attorney, Richard L. Darst of Indianapolis, said he and his client are grateful for the court of appeals addressing "the terrible sexual harassment and discrimination" at the prison.

Darst said there are other, similar cases pending against the Department of Correction in connection with conditions experienced by female prison employees. In a 2012 case, according to State Employees' Appeals Commission records, the prison was found to have discriminated against a female employee at Pendleton because of her gender and retaliated after she filed an Equal Employment Opportunity Commission complaint.

The revelations in the case of Orton-Bell, a contract worker who provided substance abuse counseling to inmates at Pendleton, came to light after she appealed her April 2010 firing for having a sexual relationship with Maj. Joe Ditmer, a 25-year Department of Correction veteran who was in charge of custody at the prison.

Court records said the pair would have sex on lunch breaks at her home near the prison and Ditmer told an internal affairs investigator he also had sex with Orton-Bell in his office at the prison.

Orton-Bell and Ditmer were both fired for "conduct that would interfere with the staff member's ability or fitness to effectively perform required duties," the appeals court order said. But when they appealed their dismissals, according to court records, Orton-Bell was not treated the same as Ditmer.

Ditmer was allowed to resign in good standing. He also continued to work at the prison as a contractor.

When Orton-Bell appealed her job dismissal to the Employees' Appeals Commission, Ditmer testified against her, and the commission ruled her dismissal was justified.

After exhausting appeals at the state level, Orton-Bell turned to a U.S. district court, where a judge ruled she was not treated differently than Ditmer and thus was not a victim of discrimination. The judge also ruled she had failed to prove she was a victim of retaliation and that "the sexual tenor of the prison's work environment was not severe or persuasive enough to qualify as hostile."

The federal appeals panel disagreed in its order Monday.

The appeals court did, however, find Orton-Bell had failed to show that she was a victim of retaliation.

The case will now go back to the U.S. District Court for the Southern District of Indiana for further proceedings on Orton-Bell's discrimination and hostile workplace claims.